Trait CubeType

Source
pub trait CubeType {
    type ExpandType: Clone + IntoMut + CubeDebug;

    // Provided method
    fn into_mut(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType { ... }
}
Expand description

Types used in a cube function must implement this trait

Variables whose values will be known at runtime must have ExpandElement as associated type Variables whose values will be known at compile time must have the primitive type as associated type

Note: Cube functions should be written using CubeTypes, so that the code generated uses the associated ExpandType. This allows Cube code to not necessitate cloning, which is cumbersome in algorithmic code. The necessary cloning will automatically appear in the generated code.

Required Associated Types§

Provided Methods§

Source

fn into_mut(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType

Wrapper around the init method, necessary to type inference.

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.

Implementations on Foreign Types§

Source§

impl CubeType for CubeCountInput

Source§

type ExpandType = CubeCountInputExpand

Source§

impl CubeType for StageIdent

Source§

impl CubeType for RoleRule

Source§

type ExpandType = RoleRuleExpand

Source§

impl CubeType for MatrixLayout

Source§

impl CubeType for FastDivmod

Source§

impl CubeType for StridedLayout

Source§

impl CubeType for bool

Source§

impl CubeType for f32

Source§

impl CubeType for f64

Source§

impl CubeType for i8

Source§

impl CubeType for i16

Source§

impl CubeType for i32

Source§

impl CubeType for i64

Source§

impl CubeType for u8

Source§

impl CubeType for u16

Source§

impl CubeType for u32

Source§

impl CubeType for u64

Source§

impl CubeType for ()

Source§

impl CubeType for e2m1

Source§

impl CubeType for e2m3

Source§

impl CubeType for e3m2

Source§

impl CubeType for e4m3

Source§

impl CubeType for e5m2

Source§

impl CubeType for ue8m0

Source§

impl CubeType for RuntimeArgs

Source§

impl CubeType for SimpleIm2col

Source§

impl CubeType for ColMajorGlobalPartitionMatmul

Source§

type ExpandType = ColMajorGlobalPartitionMatmulExpand

Source§

impl CubeType for RowMajorGlobalPartitionMatmul

Source§

type ExpandType = RowMajorGlobalPartitionMatmulExpand

Source§

impl CubeType for ZeroAccumulatorLoader

Source§

impl CubeType for TaskCounter

Source§

impl CubeType for TmaTilingOrder

Source§

impl CubeType for AsyncFullCooperativeJob

Source§

impl CubeType for AsyncFullCooperativeLoading

Source§

impl CubeType for AsyncFullCyclicJob

Source§

impl CubeType for AsynFullMaximizeSliceLengthJob

Source§

impl CubeType for AsyncFullMaximizeSliceLengthLoading

Source§

impl CubeType for AsyncFullMaximizeUnitCountJob

Source§

impl CubeType for AsyncFullMaximizeUnitCountLoading

Source§

impl CubeType for AsyncPartialMaximizeSliceLengthJob

Source§

impl CubeType for AsyncPartialMaximizeSliceLengthLoading

Source§

impl CubeType for SyncFullCyclicJob

Source§

impl CubeType for SyncFullOrderedLoading

Source§

impl CubeType for SyncFullStridedJob

Source§

impl CubeType for SyncFullStridedLoading

Source§

impl CubeType for SyncFullTilewiseJob

Source§

impl CubeType for SyncPartialCyclicJob

Source§

impl CubeType for SyncPartialTilewiseJob

Source§

impl CubeType for Specializer

Source§

type ExpandType = SpecializerExpand

Source§

impl CubeType for MatmulProblemSize

Source§

impl CubeType for PartitionSize

Source§

impl CubeType for StageSize

Source§

impl CubeType for TileSize

Source§

impl CubeType for NoEvent

Source§

impl CubeType for ColMajorTilingOrder

Source§

impl CubeType for OrderedTilingOrder

Source§

impl CubeType for RowMajorTilingOrder

Source§

impl CubeType for bf16

Source§

impl CubeType for f16

Source§

impl<E> CubeType for *const TensorMap<E>
where E: CubePrimitive,

Source§

impl<E> CubeType for *mut TensorMap<E>
where E: CubePrimitive,

Source§

impl<E> CubeType for BiasReader<E>
where E: Numeric,

Source§

impl<E> CubeType for Im2colReader<E>
where E: Numeric,

Source§

impl<E> CubeType for Im2colTmaReader<E>
where E: Numeric,

Source§

impl<E, IO> CubeType for VirtualTensor<E, IO>
where E: Numeric, IO: Clone,

Source§

impl<EA> CubeType for TileAccumulator<EA>
where EA: Numeric,

Source§

impl<EG> CubeType for TensorInputs<EG>
where EG: Numeric,

Source§

impl<EG> CubeType for TensorMapInputs<EG>
where EG: Numeric,

Source§

impl<EG> CubeType for Window<EG>
where EG: Numeric,

Source§

type ExpandType = WindowExpand<EG>

Source§

impl<EG> CubeType for MappedTensorReader<EG>
where EG: Numeric,

Source§

type ExpandType = MappedTensorReaderExpand<EG>

Source§

impl<EG> CubeType for PlaneWriter<EG>
where EG: Numeric,

Source§

type ExpandType = PlaneWriterExpand<EG>

Source§

impl<EG> CubeType for UnitWriter<EG>
where EG: Numeric,

Source§

type ExpandType = UnitWriterExpand<EG>

Source§

impl<EI> CubeType for TensorReader<EI>
where EI: Numeric,

Source§

type ExpandType = TensorReaderExpand<EI>

Source§

impl<EI, EO, GA> CubeType for TensorInput<EI, EO, GA>
where EI: Numeric, EO: Numeric, GA: MatmulArgs,

Source§

impl<EI, EO, GA> CubeType for TensorOutput<EI, EO, GA>
where EI: Numeric, EO: Numeric, GA: MatmulArgs,

Source§

impl<EO> CubeType for TensorWriter<EO>
where EO: Numeric,

Source§

type ExpandType = TensorWriterExpand<EO>

Source§

impl<ES> CubeType for Tile<ES>
where ES: Numeric,

Source§

impl<ES, T> CubeType for FullStageToTileReader<ES, T>
where ES: Numeric, T: TilingLayout,

Source§

impl<ES, T> CubeType for PartialStageToTileReader<ES, T>
where ES: Numeric, T: TilingLayout,

Source§

impl<ES, T> CubeType for StageMemory<ES, T>
where ES: Numeric, T: TilingLayout,

Source§

type ExpandType = StageMemoryExpand<ES, T>

Source§

impl<Lhs, Rhs, G> CubeType for DoubleBufferingEventListener<Lhs, Rhs, G>
where Lhs: JobExecutor<G>, Rhs: JobExecutor<G>, G: GlobalConfig,

Source§

impl<MP> CubeType for BiasLoader<MP>
where MP: MatmulPrecision,

Source§

impl<MP> CubeType for Quantization<MP>
where MP: MatmulPrecision,

Source§

impl<MP, CM, S, L, G> CubeType for AsyncFullLoader<MP, CM, S, L, G>

Source§

impl<MP, G> CubeType for SimpleIm2colLoader<MP, G>

Source§

impl<MP, G> CubeType for TmaIm2colLoader<MP, G>

Source§

impl<MP, G> CubeType for TmaLoader<MP, G>

Source§

impl<MP, G, L> CubeType for SyncFullLoader<MP, G, L>

Source§

impl<MP, G, L> CubeType for SyncPartialLoader<MP, G, L>

Source§

impl<MP, L> CubeType for SyncFullLoaderJobIterator<MP, L>

Source§

impl<MP, L> CubeType for SyncPartialLoaderJobIterator<MP, L>

Source§

impl<MP, S> CubeType for TmaWeightLoader<MP, S>

Source§

impl<MP, S, CM, L> CubeType for AsyncBufferLoader<MP, S, CM, L>

Source§

impl<P0> CubeType for (P0,)
where P0: CubeType,

Source§

impl<P0, P1> CubeType for (P0, P1)
where P0: CubeType, P1: CubeType,

Source§

impl<P0, P1, P2> CubeType for (P0, P1, P2)
where P0: CubeType, P1: CubeType, P2: CubeType,

Source§

impl<P0, P1, P2, P3> CubeType for (P0, P1, P2, P3)
where P0: CubeType, P1: CubeType, P2: CubeType, P3: CubeType,

Source§

impl<P0, P1, P2, P3, P4> CubeType for (P0, P1, P2, P3, P4)
where P0: CubeType, P1: CubeType, P2: CubeType, P3: CubeType, P4: CubeType,

Source§

impl<P0, P1, P2, P3, P4, P5> CubeType for (P0, P1, P2, P3, P4, P5)
where P0: CubeType, P1: CubeType, P2: CubeType, P3: CubeType, P4: CubeType, P5: CubeType,

Source§

impl<P0, P1, P2, P3, P4, P5, P6> CubeType for (P0, P1, P2, P3, P4, P5, P6)
where P0: CubeType, P1: CubeType, P2: CubeType, P3: CubeType, P4: CubeType, P5: CubeType, P6: CubeType,

Source§

impl<P0, P1, P2, P3, P4, P5, P6, P7> CubeType for (P0, P1, P2, P3, P4, P5, P6, P7)
where P0: CubeType, P1: CubeType, P2: CubeType, P3: CubeType, P4: CubeType, P5: CubeType, P6: CubeType, P7: CubeType,

Source§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8> CubeType for (P0, P1, P2, P3, P4, P5, P6, P7, P8)
where P0: CubeType, P1: CubeType, P2: CubeType, P3: CubeType, P4: CubeType, P5: CubeType, P6: CubeType, P7: CubeType, P8: CubeType,

Source§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> CubeType for (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9)
where P0: CubeType, P1: CubeType, P2: CubeType, P3: CubeType, P4: CubeType, P5: CubeType, P6: CubeType, P7: CubeType, P8: CubeType, P9: CubeType,

Source§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10> CubeType for (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)
where P0: CubeType, P1: CubeType, P2: CubeType, P3: CubeType, P4: CubeType, P5: CubeType, P6: CubeType, P7: CubeType, P8: CubeType, P9: CubeType, P10: CubeType,

Source§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11> CubeType for (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11)
where P0: CubeType, P1: CubeType, P2: CubeType, P3: CubeType, P4: CubeType, P5: CubeType, P6: CubeType, P7: CubeType, P8: CubeType, P9: CubeType, P10: CubeType, P11: CubeType,

Source§

impl<S, T> CubeType for ReinterpretSlice<S, T>

Source§

impl<S, T> CubeType for ReinterpretSliceMut<S, T>

Source§

impl<T> CubeType for &mut Vec<T>
where T: CubeType,

Source§

impl<T> CubeType for CubeOption<T>
where T: CubeType,

Source§

impl<T> CubeType for *const Tensor<T>
where T: CubeType,

Source§

impl<T> CubeType for *mut Tensor<T>
where T: CubeType,

Source§

impl<T> CubeType for Vec<T>
where T: CubeType,

Source§

impl<T> CubeType for AsyncFullCyclicLoading<T>
where T: TilingOrder,

Source§

impl<T> CubeType for SyncFullCyclicLoading<T>
where T: TilingOrder,

Source§

impl<T> CubeType for SyncFullTilewiseLoading<T>
where T: TilingOrder,

Source§

impl<T> CubeType for SyncPartialCyclicLoading<T>
where T: TilingOrder,

Source§

impl<T> CubeType for SyncPartialTilewiseLoading<T>
where T: TilingOrder,

Implementors§

Source§

impl CubeType for cubecl::ir::MatrixLayout

Source§

impl CubeType for flex32

Source§

impl CubeType for tf32

Source§

impl CubeType for BarrierLevel

Source§

impl<C> CubeType for &Array<C>
where C: CubeType,

Source§

impl<C> CubeType for Barrier<C>
where C: CubePrimitive,

Source§

impl<C> CubeType for Matrix<C>
where C: CubeType,

Source§

impl<C> CubeType for Array<C>
where C: CubeType,

Source§

impl<E> CubeType for SliceOrigin<E>
where E: CubePrimitive,

Source§

impl<E> CubeType for TensorMap<E>
where E: CubePrimitive,

Source§

impl<E, IO> CubeType for Slice<E, IO>

Source§

impl<Inner> CubeType for Atomic<Inner>
where Inner: CubePrimitive,

Source§

impl<K, V> CubeType for Registry<K, V>
where K: PartialOrd + Ord, V: CubeType,

Source§

impl<P> CubeType for Line<P>
where P: CubePrimitive,

Source§

impl<T> CubeType for ComptimeCell<T>
where T: CubeType,

Source§

impl<T> CubeType for RuntimeCell<T>
where T: CubeType,

Source§

impl<T> CubeType for Sequence<T>
where T: CubeType,

Source§

impl<T> CubeType for SharedMemory<T>
where T: CubePrimitive,

Source§

impl<T> CubeType for Tensor<T>
where T: CubeType,

Source§

impl<const POS: u8> CubeType for FloatExpand<POS>

Source§

impl<const POS: u8> CubeType for IntExpand<POS>