pub trait GlobalConfig:
Copy
+ Clone
+ Eq
+ PartialEq
+ Hash
+ Debug
+ Send
+ Sync
+ 'static {
type StageConfig: StageConfig;
Show 18 methods
// Required methods
fn stage_config(&self) -> Self::StageConfig;
fn global_line_size<I: Into<Ident>>(&self, ident: I) -> u32;
fn matrix_layout<I: Into<Ident>>(&self, ident: I) -> MatrixLayout;
fn num_loading_planes<I: Into<Ident>>(&self, ident: I) -> u32;
fn plane_role_config(&self) -> PlaneRoleConfig;
fn specialized_loading_sides(&self) -> SpecializedLoadingSides;
fn plane_dim(&self) -> u32;
fn check_row_bounds<I: Into<Ident>>(&self, ident: I) -> bool;
fn check_col_bounds<I: Into<Ident>>(&self, ident: I) -> bool;
fn check_k_bounds(&self) -> bool;
fn precompute_job(&self) -> bool;
fn num_stages(&self, ident: InputIdent) -> u32;
fn loader_mode(&self) -> LoaderMode;
fn event_loading_mode(&self, ident: InputIdent) -> EventLoadingMode;
fn cube_dim(&self) -> CubeDim;
// Provided methods
fn tiling_scheme(&self) -> TilingScheme { ... }
fn role_rule_config(&self) -> RoleRuleConfig { ... }
fn quantized(&self) -> bool { ... }
}
Expand description
Configuration for the global matmul level.
Required Associated Types§
Sourcetype StageConfig: StageConfig
type StageConfig: StageConfig
Underlying Stage matmul config
Required Methods§
Sourcefn stage_config(&self) -> Self::StageConfig
fn stage_config(&self) -> Self::StageConfig
Convert itself to the underlying stage matmul config
Sourcefn global_line_size<I: Into<Ident>>(&self, ident: I) -> u32
fn global_line_size<I: Into<Ident>>(&self, ident: I) -> u32
Returns the line size for the global memory corresponding to the given ident
Sourcefn matrix_layout<I: Into<Ident>>(&self, ident: I) -> MatrixLayout
fn matrix_layout<I: Into<Ident>>(&self, ident: I) -> MatrixLayout
Returns the MatrixLayout for the given ident
Sourcefn num_loading_planes<I: Into<Ident>>(&self, ident: I) -> u32
fn num_loading_planes<I: Into<Ident>>(&self, ident: I) -> u32
Returns the number of planes participating in loading ident
Sourcefn plane_role_config(&self) -> PlaneRoleConfig
fn plane_role_config(&self) -> PlaneRoleConfig
Indicates the specialization roles for the planes
Sourcefn specialized_loading_sides(&self) -> SpecializedLoadingSides
fn specialized_loading_sides(&self) -> SpecializedLoadingSides
Indicates plane roles are associated to loading which tensor input
Sourcefn check_row_bounds<I: Into<Ident>>(&self, ident: I) -> bool
fn check_row_bounds<I: Into<Ident>>(&self, ident: I) -> bool
Whether to check if accessing a row would exceed bounds.
Sourcefn check_col_bounds<I: Into<Ident>>(&self, ident: I) -> bool
fn check_col_bounds<I: Into<Ident>>(&self, ident: I) -> bool
Whether to check if accessing a col would exceed bounds.
Sourcefn check_k_bounds(&self) -> bool
fn check_k_bounds(&self) -> bool
Whether to check if accessing a col for lhs or row for rhs would exceed bounds.
Sourcefn precompute_job(&self) -> bool
fn precompute_job(&self) -> bool
Whether to put common computations for loading tasks once before loop
Sourcefn num_stages(&self, ident: InputIdent) -> u32
fn num_stages(&self, ident: InputIdent) -> u32
The number of stages in stage memory
Sourcefn loader_mode(&self) -> LoaderMode
fn loader_mode(&self) -> LoaderMode
Whether to check loader is balanced in comptime or runtime.
Not supported by all loading strategies
Sourcefn event_loading_mode(&self, ident: InputIdent) -> EventLoadingMode
fn event_loading_mode(&self, ident: InputIdent) -> EventLoadingMode
Whether event loading is constrained to be ordered
Sourcefn cube_dim(&self) -> CubeDim
fn cube_dim(&self) -> CubeDim
The CubeDim arising from the TilingScheme
Provided Methods§
Sourcefn tiling_scheme(&self) -> TilingScheme
fn tiling_scheme(&self) -> TilingScheme
Returns the TilingScheme
Sourcefn role_rule_config(&self) -> RoleRuleConfig
fn role_rule_config(&self) -> RoleRuleConfig
How to identify the role of the plane depending on its index
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.