pub trait TileMatmulFamily:
Send
+ Sync
+ 'static {
type Matmul<MP: MatmulPrecision>: TileMatmul<MP, Config = Self::Config>;
type Config: TileConfig;
// Required methods
fn requires_accelerator() -> bool;
fn computation_resources() -> Result<ComputeResources, InvalidConfigError>;
fn setup<MP: MatmulPrecision, R: Runtime>(
client: &ComputeClient<R::Server, R::Channel>,
problem: &MatmulProblem,
selection: &MatmulSelection,
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§
Sourcetype Matmul<MP: MatmulPrecision>: TileMatmul<MP, Config = Self::Config>
type Matmul<MP: MatmulPrecision>: TileMatmul<MP, Config = Self::Config>
The specific TileMatmul implementation associated with this family.
Sourcetype Config: TileConfig
type Config: TileConfig
The configuration type associated with this matmul family.
Required Methods§
Sourcefn requires_accelerator() -> bool
fn requires_accelerator() -> bool
Returns whether this tile matmul requires specialized hardware accelerators (e.g., tensor cores).
Sourcefn computation_resources() -> Result<ComputeResources, InvalidConfigError>
fn computation_resources() -> Result<ComputeResources, InvalidConfigError>
Returns the compute resources required to run this tile matmul.
Sourcefn setup<MP: MatmulPrecision, R: Runtime>(
client: &ComputeClient<R::Server, R::Channel>,
problem: &MatmulProblem,
selection: &MatmulSelection,
line_sizes: &MatmulLineSizes,
) -> Result<Self::Config, MatmulSetupError>
fn setup<MP: MatmulPrecision, R: Runtime>( client: &ComputeClient<R::Server, R::Channel>, problem: &MatmulProblem, selection: &MatmulSelection, 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§
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.