CubeType

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 GlobalScaleLayout

Source§

impl CubeType for StageBuffer

Source§

impl CubeType for RoleRule

Source§

type ExpandType = RoleRuleExpand

Source§

impl CubeType for WriteEvent

Source§

impl CubeType for MatrixLayout

Source§

impl CubeType for FastDivmod

Source§

impl CubeType for InputScalar

Source§

impl CubeType for LinearLayout

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 e2m1x2

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 BiasLayout

Source§

impl CubeType for Im2colLayout

Source§

impl CubeType for NhwcCoords

Source§

impl CubeType for NhwcLayout

Source§

impl CubeType for WeightLayout

Source§

impl CubeType for OutLayout

Source§

impl CubeType for TmaDummyLayout

Source§

impl CubeType for TmaWeightLayout

Source§

impl CubeType for RuntimeArgs

Source§

impl CubeType for SliceIndex

Source§

impl CubeType for ColMajorGlobalPartitionMatmul

Source§

type ExpandType = ColMajorGlobalPartitionMatmulExpand

Source§

impl CubeType for RowMajorGlobalPartitionMatmul

Source§

type ExpandType = RowMajorGlobalPartitionMatmulExpand

Source§

impl CubeType for BatchLayout

Source§

impl CubeType for BlockScaledLayout

Source§

impl CubeType for GlobalLayout

Source§

impl CubeType for NoopLayout

Source§

impl CubeType for SimpleTmaGlobalLayout

Source§

impl CubeType for FullStageLayout

Source§

impl CubeType for TiledLayout

Source§

impl CubeType for TaskCounter

Source§

impl CubeType for AsyncFullCooperativeJob

Source§

impl CubeType for AsyncFullCooperativeLoading

Source§

impl CubeType for AsyncFullCyclicJob

Source§

impl CubeType for AsyncFullMaximizeSliceLengthJob

Source§

impl CubeType for AsyncFullMaximizeSliceLengthLoading

Source§

impl CubeType for AsyncFullMaximizeUnitCountJob

Source§

impl CubeType for AsyncFullMaximizeUnitCountLoading

Source§

impl CubeType for AsyncFullTmaJob

Source§

impl CubeType for AsyncFullTmaLoading

Source§

impl CubeType for AsyncPartialMaximizeSliceLengthJob

Source§

impl CubeType for AsyncPartialMaximizeSliceLengthLoading

Source§

impl CubeType for AsyncPartialTmaJob

Source§

impl CubeType for AsyncPartialTmaLoading

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 PartitionScheduler

Source§

type ExpandType = PartitionSchedulerExpand

Source§

impl CubeType for ColMajorTilingOrder

Source§

impl CubeType for OrderedTilingOrder

Source§

impl CubeType for RowMajorTilingOrder

Source§

impl CubeType for TmaTilingOrder

Source§

impl CubeType for Filled

Source§

impl CubeType for Strided

Source§

impl CubeType for Swizzle

Source§

impl CubeType for PermutedLayout

Source§

impl CubeType for PlainLayout

Source§

impl CubeType for SimpleLayout

Source§

impl CubeType for StridedLayout

Source§

impl CubeType for bf16

Source§

impl CubeType for f16

Source§

impl<C> CubeType for SliceLayout<C>
where C: Coordinates,

Source§

impl<C, S> CubeType for VirtualLayout<C, S>
where C: Coordinates, S: Coordinates,

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 Im2colTmaReader<E>
where E: Numeric,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<E, C, IO> CubeType for View<E, C, IO>
where E: CubePrimitive, C: Coordinates, IO: Clone,

Source§

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

Source§

impl<E, L, IO> CubeType for TypedView<E, L, IO>

Source§

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

Source§

impl<EG, ES, L> CubeType for FullStageGlobalReader<EG, ES, L>
where EG: Numeric, ES: Numeric, L: FullLoadingStrategy,

Source§

impl<EG, ES, L> CubeType for FullStageJobIterator<EG, ES, L>
where EG: Numeric, ES: Numeric, L: FullLoadingStrategy,

Source§

impl<EG, ES, L> CubeType for PartialJobIterator<EG, ES, L>

Source§

impl<EG, ES, L> CubeType for PartialStageGlobalReader<EG, ES, L>

Source§

impl<EI> CubeType for GlobalIterator<EI>
where EI: CubePrimitive,

Source§

type ExpandType = GlobalIteratorExpand<EI>

Source§

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

Source§

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

Source§

impl<ES, IO> CubeType for StridedTile<ES, IO>
where ES: Numeric, IO: SliceVisibility,

Source§

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

Source§

impl<IP> CubeType for BiasGlobalReader<IP>
where IP: MatrixPrecision,

Source§

impl<IP> CubeType for TmaIm2colGlobalReader<IP>
where IP: MatrixPrecision,

Source§

impl<IP> CubeType for TmaWeightGlobalReader<IP>
where IP: MatrixPrecision,

Source§

impl<IP> CubeType for ZeroGlobalReader<IP>
where IP: MatrixPrecision,

Source§

impl<IP> CubeType for PlaneWriter<IP>
where IP: MatrixPrecision,

Source§

impl<IP> CubeType for UnitWriter<IP>
where IP: MatrixPrecision,

Source§

impl<L0, L1> CubeType for Chain<L0, L1>
where L0: Layout, L1: Layout<SourceCoordinates = <L0 as Layout>::Coordinates>,

Source§

impl<L> CubeType for IntoDynLayout<L>

Source§

impl<Lhs, Rhs, Acc> CubeType for TensorInputs<Lhs, Rhs, Acc>
where Lhs: Numeric, Rhs: Numeric, Acc: Numeric,

Source§

impl<Lhs, Rhs, EO> CubeType for TensorMapInputs<Lhs, Rhs, EO>
where Lhs: Numeric, Rhs: Numeric, EO: Numeric,

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<Q, S, F, C> CubeType for QuantizedView<Q, S, F, C>
where Q: CubePrimitive, S: CubePrimitive, F: Numeric, C: Coordinates + 'static,

Source§

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

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,

Source§

impl<T, C, S, V> CubeType for VirtualView<T, C, S, V>

Source§

impl<T, C, S, V> CubeType for VirtualViewMut<T, C, S, V>

Implementors§

Source§

impl CubeType for cubecl::ir::MatrixLayout

Source§

impl CubeType for flex32

Source§

impl CubeType for tf32

Source§

impl CubeType for Barrier

Source§

impl CubeType for BarrierLevel

Source§

impl CubeType for BarrierToken

Source§

impl<A, B, CD> CubeType for MmaDefinition<A, B, CD>
where A: CubeType, B: CubeType, CD: CubeType,

Source§

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

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<E, IO> CubeType for &mut Slice<E, IO>

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<P> CubeType for &mut Line<P>
where P: CubePrimitive,

Source§

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

Source§

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

Source§

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

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 ElemExpand<POS>

Source§

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