Trait GlobalMatmulFamily

Source
pub trait GlobalMatmulFamily:
    Send
    + Sync
    + 'static {
    type Matmul<MP: MatmulPrecision>: GlobalMatmul<MP, Config = Self::Config>;
    type Config: GlobalConfig;

    // Required method
    fn setup<MP: MatmulPrecision, R: Runtime>(
        client: &ComputeClient<R::Server, R::Channel>,
        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 matmuls working with any precision.

Required Associated Types§

Source

type Matmul<MP: MatmulPrecision>: GlobalMatmul<MP, Config = Self::Config>

The specific GlobalMatmul implementation associated with this family.

Source

type Config: GlobalConfig

The configuration type associated with this matmul family.

Required Methods§

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.

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<SMM> GlobalMatmulFamily for SimpleTmaMatmulFamily<SMM>
where SMM: StageMatmulFamily<LhsReader = FullReaderFamily, RhsReader = FullReaderFamily>,

Source§

impl<SMM, LL, RL> GlobalMatmulFamily for DoubleBufferingMatmulFamily<SMM, LL, RL>

Source§

impl<SMM, LL, RL> GlobalMatmulFamily for SimpleBarrierMatmulFamily<SMM, LL, RL>

Source§

impl<SMM, LL, RL> GlobalMatmulFamily for SimpleMatmulFamily<SMM, LL, RL>

Source§

impl<SMM, RL> GlobalMatmulFamily for OrderedDoubleBufferingMatmulFamily<SMM, RL>