cubecl_matmul/components/global/write/
base.rs

1use crate::components::global::GlobalConfig;
2use cubecl_core as cubecl;
3use cubecl_core::prelude::*;
4
5#[cube]
6/// Responsible of writing the accumulated stage matmul output
7/// to global memory
8pub trait GlobalWriter<EO: Numeric>: CubeType + 'static + Send + Sync {
9    /// Writes the given slice to global memory, at a position that depends on
10    /// plane and accumulator indexes.
11    fn write<G: GlobalConfig>(
12        this: &mut Self,
13        slice: Slice<Line<EO>>,
14        tile_m: u32,
15        tile_n: u32,
16        #[comptime] config: G,
17    );
18}