pub trait AsyncLoadingJob<IP: MatrixPrecision, TL: TilingLayout>:
CubeType
+ Copy
+ Clone {
// Required methods
fn execute_task<CM: CopyMechanism, G: GlobalConfig>(
this: &mut Self,
task_id: u32,
tensor_reader: &GlobalIterator<Line<IP::Global>>,
stage_memory: &mut StridedStage<IP::Stage, TL>,
mechanism: &CM,
config: G,
);
fn task_count(this: &Self) -> u32;
fn __expand_execute_task<CM: CopyMechanism, G: GlobalConfig>(
scope: &mut Scope,
this: <Self as CubeType>::ExpandType,
task_id: <u32 as CubeType>::ExpandType,
tensor_reader: <GlobalIterator<Line<IP::Global>> as CubeType>::ExpandType,
stage_memory: <StridedStage<IP::Stage, TL> as CubeType>::ExpandType,
mechanism: <CM as CubeType>::ExpandType,
config: G,
) -> <() as CubeType>::ExpandType;
fn __expand_task_count(
scope: &mut Scope,
this: <Self as CubeType>::ExpandType,
) -> u32;
}Expand description
A loading job represents a sequence of loading tasks. Each task is the smallest unit of loading work: one unit at one iteration, operating at a specific point within a read view. The job holds shared information reused across read views and iterations. By calling execute_task at strategic moments, one can hope to speed up the matmul.
Required Methods§
Sourcefn execute_task<CM: CopyMechanism, G: GlobalConfig>(
this: &mut Self,
task_id: u32,
tensor_reader: &GlobalIterator<Line<IP::Global>>,
stage_memory: &mut StridedStage<IP::Stage, TL>,
mechanism: &CM,
config: G,
)
fn execute_task<CM: CopyMechanism, G: GlobalConfig>( this: &mut Self, task_id: u32, tensor_reader: &GlobalIterator<Line<IP::Global>>, stage_memory: &mut StridedStage<IP::Stage, TL>, mechanism: &CM, config: G, )
Execute the task_idth loading task
Sourcefn task_count(this: &Self) -> u32
fn task_count(this: &Self) -> u32
Get the number of tasks
fn __expand_execute_task<CM: CopyMechanism, G: GlobalConfig>( scope: &mut Scope, this: <Self as CubeType>::ExpandType, task_id: <u32 as CubeType>::ExpandType, tensor_reader: <GlobalIterator<Line<IP::Global>> as CubeType>::ExpandType, stage_memory: <StridedStage<IP::Stage, TL> as CubeType>::ExpandType, mechanism: <CM as CubeType>::ExpandType, config: G, ) -> <() as CubeType>::ExpandType
fn __expand_task_count( scope: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> u32
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.