pub struct AcceleratedMatmul;
Expand description
Uses one plane to perform a small matmul using accelerated instructions.
Trait Implementations§
Source§impl<MP: MatmulPrecision> TileMatmul<MP> for AcceleratedMatmul
impl<MP: MatmulPrecision> TileMatmul<MP> for AcceleratedMatmul
Source§type Accumulator = Matrix<<MP as MatmulPrecision>::EA>
type Accumulator = Matrix<<MP as MatmulPrecision>::EA>
Contains and accumulates results of the Tile Matmul execution
Source§fn execute(
lhs: &Self::Lhs,
rhs: &Self::Rhs,
out: &mut Self::Accumulator,
_config: Self::Config,
)
fn execute( lhs: &Self::Lhs, rhs: &Self::Rhs, out: &mut Self::Accumulator, _config: Self::Config, )
Executes the matrix multiplication of Lhs and Rhs, adding the result to the accumulator
Source§fn fill_lhs(tile: &Tile<MP::ES>, lhs: &mut Self::Lhs, config: Self::Config)
fn fill_lhs(tile: &Tile<MP::ES>, lhs: &mut Self::Lhs, config: Self::Config)
Fill the container of Lhs with tile data
Source§fn fill_rhs(tile: &Tile<MP::ES>, rhs: &mut Self::Rhs, config: Self::Config)
fn fill_rhs(tile: &Tile<MP::ES>, rhs: &mut Self::Rhs, config: Self::Config)
Fill the container of Rhs with tile data
Source§fn fill_accumulator(
tile: &Tile<MP::EA>,
acc: &mut Self::Accumulator,
config: Self::Config,
)
fn fill_accumulator( tile: &Tile<MP::EA>, acc: &mut Self::Accumulator, config: Self::Config, )
Fill the accumulator with data
Source§fn write_results(
out: &Self::Accumulator,
slice: &mut SliceMut<Line<MP::EO>>,
config: Self::Config,
)
fn write_results( out: &Self::Accumulator, slice: &mut SliceMut<Line<MP::EO>>, config: Self::Config, )
Write the content of the output container to the given slice
Source§fn allocate_accumulator(config: Self::Config) -> Self::Accumulator
fn allocate_accumulator(config: Self::Config) -> Self::Accumulator
Allocate the container to receive the execution output. Read more
Source§fn zero_accumulator(acc: &mut Self::Accumulator, _config: Self::Config)
fn zero_accumulator(acc: &mut Self::Accumulator, _config: Self::Config)
Fill the accumulator with zeros.
fn __expand_execute( scope: &mut Scope, lhs: <Self::Lhs as CubeType>::ExpandType, rhs: <Self::Rhs as CubeType>::ExpandType, out: <Self::Accumulator as CubeType>::ExpandType, _config: Self::Config, ) -> <() as CubeType>::ExpandType
fn __expand_allocate_lhs( scope: &mut Scope, config: Self::Config, ) -> <Self::Lhs as CubeType>::ExpandType
fn __expand_allocate_rhs( scope: &mut Scope, config: Self::Config, ) -> <Self::Rhs as CubeType>::ExpandType
fn __expand_fill_lhs( scope: &mut Scope, tile: <Tile<MP::ES> as CubeType>::ExpandType, lhs: <Self::Lhs as CubeType>::ExpandType, config: Self::Config, ) -> <() as CubeType>::ExpandType
fn __expand_fill_rhs( scope: &mut Scope, tile: <Tile<MP::ES> as CubeType>::ExpandType, rhs: <Self::Rhs as CubeType>::ExpandType, config: Self::Config, ) -> <() as CubeType>::ExpandType
fn __expand_fill_accumulator( scope: &mut Scope, tile: <Tile<MP::EA> as CubeType>::ExpandType, acc: <Self::Accumulator as CubeType>::ExpandType, config: Self::Config, ) -> <() as CubeType>::ExpandType
fn __expand_write_results( scope: &mut Scope, out: <Self::Accumulator as CubeType>::ExpandType, slice: <SliceMut<Line<MP::EO>> as CubeType>::ExpandType, config: Self::Config, ) -> <() as CubeType>::ExpandType
fn __expand_allocate_accumulator( scope: &mut Scope, config: Self::Config, ) -> <Self::Accumulator as CubeType>::ExpandType
fn __expand_zero_accumulator( scope: &mut Scope, acc: <Self::Accumulator as CubeType>::ExpandType, _config: Self::Config, ) -> <() as CubeType>::ExpandType
Source§impl TileMatmulFamily for AcceleratedMatmul
impl TileMatmulFamily for AcceleratedMatmul
Source§type Matmul<MP: MatmulPrecision> = AcceleratedMatmul
type Matmul<MP: MatmulPrecision> = AcceleratedMatmul
The specific TileMatmul implementation associated with this family.
Source§fn requires_accelerator() -> bool
fn requires_accelerator() -> bool
Returns whether this tile matmul requires specialized hardware accelerators (e.g., tensor cores).
Source§fn computation_resources() -> Result<ComputeResources, InvalidConfigError>
fn computation_resources() -> Result<ComputeResources, InvalidConfigError>
Returns the compute resources required to run this tile matmul.
Source§fn setup<MP: MatmulPrecision, R: Runtime>(
client: &ComputeClient<R::Server, R::Channel>,
problem: &MatmulProblem,
selection: &MatmulSelection,
matmul_line_sizes: &MatmulLineSizes,
) -> Result<Self::Config, MatmulSetupError>
fn setup<MP: MatmulPrecision, R: Runtime>( client: &ComputeClient<R::Server, R::Channel>, problem: &MatmulProblem, selection: &MatmulSelection, matmul_line_sizes: &MatmulLineSizes, ) -> Result<Self::Config, MatmulSetupError>
Constructs the configuration based on the matmul problem, selection, and line sizes. Read more
Source§fn filter_line_sizes(
available_line_sizes: AvailableLineSizes,
) -> AvailableLineSizes
fn filter_line_sizes( available_line_sizes: AvailableLineSizes, ) -> AvailableLineSizes
Filters out line sizes that are incompatible with this matmul family. Read more
Auto Trait Implementations§
impl Freeze for AcceleratedMatmul
impl RefUnwindSafe for AcceleratedMatmul
impl Send for AcceleratedMatmul
impl Sync for AcceleratedMatmul
impl Unpin for AcceleratedMatmul
impl UnwindSafe for AcceleratedMatmul
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more