pub struct SyncPartialLoader<MP: MatmulPrecision, G: GlobalConfig, L: SyncPartialLoadingStrategy> { /* private fields */ }
Expand description
Loads a stage from stage memory using synchronous data movement operations.
A complete load is referred to as a Job
, which is divided into Tasks
—
each Task represents a single data transfer for a specific unit
Implementations§
Source§impl<MP: MatmulPrecision, G: GlobalConfig, L: SyncPartialLoadingStrategy> SyncPartialLoader<MP, G, L>
impl<MP: MatmulPrecision, G: GlobalConfig, L: SyncPartialLoadingStrategy> SyncPartialLoader<MP, G, L>
Sourcepub fn new(
tensor: VirtualTensor<MP::EI>,
x_offset: u32,
y_offset: u32,
batch_offset: u32,
quantization: CubeOption<Quantization<MP>>,
input_ident: InputIdent,
config: G,
) -> Self
pub fn new( tensor: VirtualTensor<MP::EI>, x_offset: u32, y_offset: u32, batch_offset: u32, quantization: CubeOption<Quantization<MP>>, input_ident: InputIdent, config: G, ) -> Self
Create a new SyncPartialLoader
Sourcepub fn reader(
this: &Self,
stage_ident: StageIdent,
) -> PartialStageToTileReader<MP::ES, L::TilingLayout>
pub fn reader( this: &Self, stage_ident: StageIdent, ) -> PartialStageToTileReader<MP::ES, L::TilingLayout>
Give a reader to the loaded stage memory.
Sourcepub fn advance_view(this: &mut Self, k_offset: u32)
pub fn advance_view(this: &mut Self, k_offset: u32)
Advance the view over global memory along the k dimension by a specified offset, k_offset
.
Sourcepub fn fill_stage(this: &mut Self, stage_ident: StageIdent, config: G)
pub fn fill_stage(this: &mut Self, stage_ident: StageIdent, config: G)
Accomplish the entire job of filling the stage memory
pub fn __expand_new( scope: &mut Scope, tensor: <VirtualTensor<MP::EI> as CubeType>::ExpandType, x_offset: <u32 as CubeType>::ExpandType, y_offset: <u32 as CubeType>::ExpandType, batch_offset: <u32 as CubeType>::ExpandType, quantization: <CubeOption<Quantization<MP>> as CubeType>::ExpandType, input_ident: InputIdent, config: G, ) -> <Self as CubeType>::ExpandType
pub fn __expand_reader( scope: &mut Scope, this: <Self as CubeType>::ExpandType, stage_ident: StageIdent, ) -> <PartialStageToTileReader<MP::ES, L::TilingLayout> as CubeType>::ExpandType
pub fn __expand_advance_view( scope: &mut Scope, this: <Self as CubeType>::ExpandType, k_offset: <u32 as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType
pub fn __expand_fill_stage( scope: &mut Scope, this: <Self as CubeType>::ExpandType, stage_ident: StageIdent, config: G, ) -> <() as CubeType>::ExpandType
Trait Implementations§
Source§impl<MP: Clone + MatmulPrecision, G: Clone + GlobalConfig, L: Clone + SyncPartialLoadingStrategy> Clone for SyncPartialLoader<MP, G, L>
impl<MP: Clone + MatmulPrecision, G: Clone + GlobalConfig, L: Clone + SyncPartialLoadingStrategy> Clone for SyncPartialLoader<MP, G, L>
Source§fn clone(&self) -> SyncPartialLoader<MP, G, L>
fn clone(&self) -> SyncPartialLoader<MP, G, L>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<MP: MatmulPrecision, G: GlobalConfig, L: SyncPartialLoadingStrategy> CubeType for SyncPartialLoader<MP, G, L>
impl<MP: MatmulPrecision, G: GlobalConfig, L: SyncPartialLoadingStrategy> CubeType for SyncPartialLoader<MP, G, L>
type ExpandType = SyncPartialLoaderExpand<MP, G, L>
Source§fn into_mut(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
fn into_mut(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
Wrapper around the init method, necessary to type inference.
Source§impl<MP: MatmulPrecision, G: GlobalConfig, L: SyncPartialLoadingStrategy> JobExecutor<G> for SyncPartialLoader<MP, G, L>
impl<MP: MatmulPrecision, G: GlobalConfig, L: SyncPartialLoadingStrategy> JobExecutor<G> for SyncPartialLoader<MP, G, L>
Source§type JobIterator = SyncPartialLoaderJobIterator<MP, L>
type JobIterator = SyncPartialLoaderJobIterator<MP, L>
The job to execute
Source§fn create_job_iterator(
this: &Self,
stage_ident: StageIdent,
config: G,
) -> Self::JobIterator
fn create_job_iterator( this: &Self, stage_ident: StageIdent, config: G, ) -> Self::JobIterator
Create the job to execute
Source§fn execute_task(
this: &mut Self,
job_iterator: &mut SyncPartialLoaderJobIterator<MP, L>,
config: G,
)
fn execute_task( this: &mut Self, job_iterator: &mut SyncPartialLoaderJobIterator<MP, L>, config: G, )
Execute the next task
Source§fn execute_all_remaining_tasks(
this: &mut Self,
job_iterator: &mut Self::JobIterator,
config: G,
)
fn execute_all_remaining_tasks( this: &mut Self, job_iterator: &mut Self::JobIterator, config: G, )
Execute all tasks that remain at once
Source§fn execute_whole_job(this: &mut Self, stage_ident: StageIdent, config: G)
fn execute_whole_job(this: &mut Self, stage_ident: StageIdent, config: G)
Create a job and execute all its tasks at once
fn __expand_create_job_iterator( scope: &mut Scope, this: <Self as CubeType>::ExpandType, stage_ident: StageIdent, config: G, ) -> <Self::JobIterator as CubeType>::ExpandType
fn __expand_execute_task( scope: &mut Scope, this: <Self as CubeType>::ExpandType, job_iterator: <SyncPartialLoaderJobIterator<MP, L> as CubeType>::ExpandType, config: G, ) -> <() as CubeType>::ExpandType
fn __expand_execute_all_remaining_tasks( scope: &mut Scope, this: <Self as CubeType>::ExpandType, job_iterator: <Self::JobIterator as CubeType>::ExpandType, config: G, ) -> <() as CubeType>::ExpandType
fn __expand_execute_whole_job( scope: &mut Scope, this: <Self as CubeType>::ExpandType, stage_ident: StageIdent, config: G, ) -> <() as CubeType>::ExpandType
Auto Trait Implementations§
impl<MP, G, L> Freeze for SyncPartialLoader<MP, G, L>
impl<MP, G, L> RefUnwindSafe for SyncPartialLoader<MP, G, L>where
G: RefUnwindSafe,
<L as SyncPartialLoadingStrategy>::TilingLayout: RefUnwindSafe,
<L as SyncPartialLoadingStrategy>::Job<MP>: RefUnwindSafe,
<MP as MatmulPrecision>::ES: RefUnwindSafe,
<MP as MatmulPrecision>::EI: RefUnwindSafe,
impl<MP, G, L> Send for SyncPartialLoader<MP, G, L>
impl<MP, G, L> Sync for SyncPartialLoader<MP, G, L>
impl<MP, G, L> Unpin for SyncPartialLoader<MP, G, L>where
G: Unpin,
<L as SyncPartialLoadingStrategy>::TilingLayout: Unpin,
<L as SyncPartialLoadingStrategy>::Job<MP>: Unpin,
<MP as MatmulPrecision>::ES: Unpin,
<MP as MatmulPrecision>::EI: Unpin,
impl<MP, G, L> UnwindSafe for SyncPartialLoader<MP, G, L>where
G: UnwindSafe,
<L as SyncPartialLoadingStrategy>::TilingLayout: UnwindSafe,
<L as SyncPartialLoadingStrategy>::Job<MP>: UnwindSafe,
<MP as MatmulPrecision>::ES: UnwindSafe,
<MP as MatmulPrecision>::EI: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more