pub trait MatmulConfigFactory:
Send
+ Sync
+ 'static {
type Config: MatmulConfig;
type Input;
// Required methods
fn check_config(config: &Self::Config) -> Result<(), InvalidConfigError>;
fn check_availability<R: Runtime, MP: MatmulPrecision>(
_client: &ComputeClient<R::Server, R::Channel>,
_config: &Self::Config,
) -> Result<(), MatmulAvailabilityError>;
fn make_config(
input: Self::Input,
problem: &MatmulProblem,
cube_dim: &CubeDim,
cube_count: &CubeCount,
quantized: bool,
) -> Self::Config;
}
Expand description
Provides configuration for a matmul kernel at any level
Required Associated Types§
Sourcetype Config: MatmulConfig
type Config: MatmulConfig
Configuration tailored to the matmul implementation
type Input
Required Methods§
Sourcefn check_config(config: &Self::Config) -> Result<(), InvalidConfigError>
fn check_config(config: &Self::Config) -> Result<(), InvalidConfigError>
Asserts that the configuration for this matmul will lead to a valid computation
Sourcefn check_availability<R: Runtime, MP: MatmulPrecision>(
_client: &ComputeClient<R::Server, R::Channel>,
_config: &Self::Config,
) -> Result<(), MatmulAvailabilityError>
fn check_availability<R: Runtime, MP: MatmulPrecision>( _client: &ComputeClient<R::Server, R::Channel>, _config: &Self::Config, ) -> Result<(), MatmulAvailabilityError>
Checks if the client can handle the features used in this computation
Sourcefn make_config(
input: Self::Input,
problem: &MatmulProblem,
cube_dim: &CubeDim,
cube_count: &CubeCount,
quantized: bool,
) -> Self::Config
fn make_config( input: Self::Input, problem: &MatmulProblem, cube_dim: &CubeDim, cube_count: &CubeCount, quantized: bool, ) -> Self::Config
Create config for this matmul, given launch information
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.