TileMatmulFamily

Trait TileMatmulFamily 

Source
pub trait TileMatmulFamily:
    Send
    + Sync
    + 'static {
    type Matmul<L: Numeric, R: Numeric, A: Numeric>: TileMatmul<L, R, A, Config = Self::Config, LhsTile = Self::LhsTile, RhsTile = Self::RhsTile, AccTile = Self::AccTile, OutTile = Self::OutTile>;
    type LhsTile: TileKind;
    type RhsTile: TileKind;
    type AccTile: TileKind;
    type OutTile: TileKind<ReadWrite>;
    type Config: TileConfig;

    // Required methods
    fn requires_accelerator() -> bool;
    fn computation_resources() -> Result<ComputeResources, InvalidConfigError>;
    fn setup<Lhs: Numeric, Rhs: Numeric, Acc: Numeric, R: Runtime>(
        client: &ComputeClient<R::Server>,
        problem: &MatmulProblem,
        selection: &MatmulSelection,
        matmul_line_sizes: &MatmulLineSizes,
    ) -> Result<Self::Config, MatmulSetupError>;

    // Provided method
    fn filter_line_sizes(
        available_line_sizes: AvailableLineSizes,
    ) -> AvailableLineSizes { ... }
}
Expand description

A family of TileMatmul implementations that operate with any precision.

Required Associated Types§

Source

type Matmul<L: Numeric, R: Numeric, A: Numeric>: TileMatmul<L, R, A, Config = Self::Config, LhsTile = Self::LhsTile, RhsTile = Self::RhsTile, AccTile = Self::AccTile, OutTile = Self::OutTile>

The specific TileMatmul implementation associated with this family.

Source

type LhsTile: TileKind

Tile kind for Lhs

Source

type RhsTile: TileKind

Tile kind for Rhs

Source

type AccTile: TileKind

Tile kind for Acc

Source

type OutTile: TileKind<ReadWrite>

Tile kind for Out

Source

type Config: TileConfig

The configuration type associated with this matmul family.

Required Methods§

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<Lhs: Numeric, Rhs: Numeric, Acc: Numeric, R: Runtime>( client: &ComputeClient<R::Server>, problem: &MatmulProblem, selection: &MatmulSelection, matmul_line_sizes: &MatmulLineSizes, ) -> Result<Self::Config, MatmulSetupError>

Constructs the configuration based on the matmul problem, selection, and line sizes.

This function may return an error if the configuration cannot be supported on the current runtime.

Provided Methods§

Source

fn filter_line_sizes( available_line_sizes: AvailableLineSizes, ) -> AvailableLineSizes

Filters out line sizes that are incompatible with this matmul family.

By default, returns the input unchanged.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<AccTile: TileKind> TileMatmulFamily for RegisterMatmul<AccTile>
where RegisterStageReader<AccTile>: RegisterFragmentReader<TileKind = AccTile>,

Source§

impl<Kind: TileKind> TileMatmulFamily for PlaneVecMatInnerProduct<Kind>
where MatrixStageReader<Kind>: MatrixFragmentReader<TileKind = Kind>,

Source§

type Matmul<L: Numeric, R: Numeric, A: Numeric> = PlaneVecMatInnerProduct<Kind>

Source§

type Config = PlaneVecMatInnerProductConfig

Source§

type LhsTile = Strided

Source§

type RhsTile = Strided

Source§

type AccTile = Kind

Source§

type OutTile = Strided

Source§

impl<Tile: TileKind> TileMatmulFamily for AcceleratedMatmul<Tile>
where CmmaStageReader<Tile>: CmmaFragmentReader<TileKind = Tile>,

Source§

impl<Tile: TileKind> TileMatmulFamily for MmaMatmul<Tile>
where MmaStageReader<Tile>: MmaFragmentReader<TileKind = Tile>,