GlobalWriter

Trait GlobalWriter 

Source
pub trait GlobalWriter<IP: MatrixPrecision>:
    WriteEventListener
    + CubeType
    + 'static
    + Send
    + Sync {
    type Stage: Stage<IP::Stage, ReadWrite>;

    // Required methods
    fn init<S: StageConfig>(
        tensor: View<Line<IP::Global>, Coords2d, ReadWrite>,
        config: GlobalMemoryConfig,
        stage_config: S,
    ) -> Self;
    fn stage(this: &Self) -> Self::Stage;
    fn __expand_init<S: StageConfig>(
        scope: &mut Scope,
        tensor: <View<Line<IP::Global>, Coords2d, ReadWrite> as CubeType>::ExpandType,
        config: GlobalMemoryConfig,
        stage_config: S,
    ) -> <Self as CubeType>::ExpandType;
    fn __expand_stage(
        scope: &mut Scope,
        this: <Self as CubeType>::ExpandType,
    ) -> <Self::Stage as CubeType>::ExpandType;
}
Expand description

Responsible of writing the accumulated stage matmul output to global memory

Required Associated Types§

Source

type Stage: Stage<IP::Stage, ReadWrite>

Tile stage that stores the data for this writer

Required Methods§

Source

fn init<S: StageConfig>( tensor: View<Line<IP::Global>, Coords2d, ReadWrite>, config: GlobalMemoryConfig, stage_config: S, ) -> Self

Init this writer from a global tensor and config

Source

fn stage(this: &Self) -> Self::Stage

Stage used by this writer

Source

fn __expand_init<S: StageConfig>( scope: &mut Scope, tensor: <View<Line<IP::Global>, Coords2d, ReadWrite> as CubeType>::ExpandType, config: GlobalMemoryConfig, stage_config: S, ) -> <Self as CubeType>::ExpandType

Source

fn __expand_stage( scope: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> <Self::Stage as CubeType>::ExpandType

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.

Implementors§