pub trait StageMatmulFamily:
Send
+ Sync
+ 'static {
type Matmul<MP: MatmulPrecision, TL: TilingLayout, TR: TilingLayout, TA: TilingLayout, TO: TilingLayout>: StageMatmul<MP, Config = Self::Config, LhsStage = <Self::LhsStage as StageFamily>::Stage<LhsS<MP>, TL>, RhsStage = <Self::RhsStage as StageFamily>::Stage<RhsS<MP>, TR>, AccStage = <Self::AccStage as StageFamily>::Stage<AccS<MP>, TA>, OutStage = <Self::OutStage as StageFamily<ReadWrite>>::Stage<AccS<MP>, TO>>;
type LhsStage: StageFamily;
type RhsStage: StageFamily;
type AccStage: StageFamily;
type OutStage: StageFamily<ReadWrite>;
type Config: StageConfig;
// Required method
fn setup<MP: MatmulPrecision, R: Runtime>(
client: &ComputeClient<R::Server>,
problem: &MatmulProblem,
selection: &MatmulSelection,
line_sizes: &MatmulLineSizes,
num_stages: NumStages,
max_global_readers: Option<MaxGlobalReaderPlanes>,
ordered: bool,
) -> Result<Self::Config, MatmulSetupError>;
// Provided method
fn filter_line_sizes(
available_line_sizes: AvailableLineSizes,
) -> AvailableLineSizes { ... }
}Expand description
A family of StageMatmul implementations that operate with any precision.
Required Associated Types§
Sourcetype Matmul<MP: MatmulPrecision, TL: TilingLayout, TR: TilingLayout, TA: TilingLayout, TO: TilingLayout>: StageMatmul<MP, Config = Self::Config, LhsStage = <Self::LhsStage as StageFamily>::Stage<LhsS<MP>, TL>, RhsStage = <Self::RhsStage as StageFamily>::Stage<RhsS<MP>, TR>, AccStage = <Self::AccStage as StageFamily>::Stage<AccS<MP>, TA>, OutStage = <Self::OutStage as StageFamily<ReadWrite>>::Stage<AccS<MP>, TO>>
type Matmul<MP: MatmulPrecision, TL: TilingLayout, TR: TilingLayout, TA: TilingLayout, TO: TilingLayout>: StageMatmul<MP, Config = Self::Config, LhsStage = <Self::LhsStage as StageFamily>::Stage<LhsS<MP>, TL>, RhsStage = <Self::RhsStage as StageFamily>::Stage<RhsS<MP>, TR>, AccStage = <Self::AccStage as StageFamily>::Stage<AccS<MP>, TA>, OutStage = <Self::OutStage as StageFamily<ReadWrite>>::Stage<AccS<MP>, TO>>
The specific [TileMatmul] implementation associated with this family.
Sourcetype LhsStage: StageFamily
type LhsStage: StageFamily
Stage family for Lhs
Sourcetype RhsStage: StageFamily
type RhsStage: StageFamily
Stage family for Rhs
Sourcetype AccStage: StageFamily
type AccStage: StageFamily
Stage family for Acc
Sourcetype OutStage: StageFamily<ReadWrite>
type OutStage: StageFamily<ReadWrite>
Stage family for Out
Sourcetype Config: StageConfig
type Config: StageConfig
The configuration type associated with this matmul family.
Required Methods§
Sourcefn setup<MP: MatmulPrecision, R: Runtime>(
client: &ComputeClient<R::Server>,
problem: &MatmulProblem,
selection: &MatmulSelection,
line_sizes: &MatmulLineSizes,
num_stages: NumStages,
max_global_readers: Option<MaxGlobalReaderPlanes>,
ordered: bool,
) -> Result<Self::Config, MatmulSetupError>
fn setup<MP: MatmulPrecision, R: Runtime>( client: &ComputeClient<R::Server>, problem: &MatmulProblem, selection: &MatmulSelection, line_sizes: &MatmulLineSizes, num_stages: NumStages, max_global_readers: Option<MaxGlobalReaderPlanes>, ordered: bool, ) -> Result<Self::Config, MatmulSetupError>
Constructs the configuration based on the matmul problem, selection, line sizes, number of stages, maximum of tasks per plane, and whether the algorithm is an ordered variant
This function may return an error if the configuration cannot be supported on the current runtime.
Provided Methods§
Sourcefn 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.
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.