Struct AcceleratedMatmul

Source
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

Source§

type Config = AcceleratedConfig

The configuration type associated with this Matmul.
Source§

type Lhs = Matrix<<MP as MatmulPrecision>::ES>

Contains Lhs data for computation
Source§

type Rhs = Matrix<<MP as MatmulPrecision>::ES>

Contains Rhs data for computation
Source§

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, )

Executes the matrix multiplication of Lhs and Rhs, adding the result to the accumulator
Source§

fn allocate_lhs(config: Self::Config) -> Self::Lhs

Create the container for Lhs Read more
Source§

fn allocate_rhs(config: Self::Config) -> Self::Rhs

Create the container for Rhs Read more
Source§

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)

Fill the container of Rhs with tile data
Source§

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, )

Write the content of the output container to the given slice
Source§

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)

Fill the accumulator with zeros.
Source§

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

Source§

fn __expand_allocate_lhs( scope: &mut Scope, config: Self::Config, ) -> <Self::Lhs as CubeType>::ExpandType

Source§

fn __expand_allocate_rhs( scope: &mut Scope, config: Self::Config, ) -> <Self::Rhs as CubeType>::ExpandType

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn __expand_allocate_accumulator( scope: &mut Scope, config: Self::Config, ) -> <Self::Accumulator as CubeType>::ExpandType

Source§

fn __expand_zero_accumulator( scope: &mut Scope, acc: <Self::Accumulator as CubeType>::ExpandType, _config: Self::Config, ) -> <() as CubeType>::ExpandType

Source§

impl TileMatmulFamily for AcceleratedMatmul

Source§

type Matmul<MP: MatmulPrecision> = AcceleratedMatmul

The specific TileMatmul implementation associated with this family.
Source§

type Config = AcceleratedConfig

The configuration type associated with this matmul family.
Source§

fn requires_accelerator() -> bool

Returns whether this tile matmul requires specialized hardware accelerators (e.g., tensor cores).
Source§

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>

Constructs the configuration based on the matmul problem, selection, and line sizes. Read more
Source§

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V