Expand description
Cube Frontend Types.
Re-exports§
pub use asm::*;pub use branch::*;pub use synchronization::*;pub use trigonometry::*;
Modules§
- ABSOLUTE_
POS - The position of the working unit in the whole cube kernel, without regards to cubes and axis.
- ABSOLUTE_
POS_ X - The index of the working unit in the whole cube kernel along the X axis, without regards to cubes.
- ABSOLUTE_
POS_ Y - The index of the working unit in the whole cube kernel along the Y axis, without regards to cubes.
- ABSOLUTE_
POS_ Z - The index of the working unit in the whole cube kernel along the Z axis, without regards to cubes.
- CUBE_
CLUSTER_ DIM - The total amount of cubes in a cluster.
- CUBE_
CLUSTER_ DIM_ X - The dimension of the cluster along the X axis.
- CUBE_
CLUSTER_ DIM_ Y - The dimension of the cluster along the Y axis.
- CUBE_
CLUSTER_ DIM_ Z - The dimension of the cluster along the Z axis.
- CUBE_
COUNT - The number of cubes launched.
- CUBE_
COUNT_ X - The number of cubes launched along the X axis.
- CUBE_
COUNT_ Y - The number of cubes launched along the Y axis.
- CUBE_
COUNT_ Z - The number of cubes launched along the Z axis.
- CUBE_
DIM - The total amount of working units in a cube.
- CUBE_
DIM_ X - The dimension of the cube along the X axis.
- CUBE_
DIM_ Y - The dimension of the cube along the Y axis.
- CUBE_
DIM_ Z - The dimension of the cube along the Z axis.
- CUBE_
POS - The cube position, without regards to axis.
- CUBE_
POS_ CLUSTER - The cube position within the cluster.
- CUBE_
POS_ CLUSTER_ X - The cube position in the cluster along the X axis.
- CUBE_
POS_ CLUSTER_ Y - The cube position in the cluster along the Y axis.
- CUBE_
POS_ CLUSTER_ Z - The cube position in the cluster along the Z axis.
- CUBE_
POS_ X - The cube position along the X axis.
- CUBE_
POS_ Y - The cube position along the Y axis.
- CUBE_
POS_ Z - The cube position along the Z axis.
- PLANE_
DIM - The total amount of working units in a plane.
- PLANE_
POS - The position of the plane within the cube (plane/warp/subgroup index).
- UNIT_
POS - The position of the working unit inside the cube, without regards to axis.
- UNIT_
POS_ PLANE - The relative position of the working unit inside the plane, without regards to cube dimensions.
- UNIT_
POS_ X - The position of the working unit inside the cube along the X axis.
- UNIT_
POS_ Y - The position of the working unit inside the cube along the Y axis.
- UNIT_
POS_ Z - The position of the working unit inside the cube along the Z axis.
- asm
- assign
- barrier
- This module exposes barrier for asynchronous data transfer
- branch
- buffer_
len - clamp
- clamp_
max - clamp_
min - clamp_
nan - Expansion of
clamp_nan(). - cmma
- This module exposes cooperative matrix-multiply and accumulate operations.
- comptime
- Module containing compile-time information about the current runtime.
- comptime_
error - copy
- copy_
bulk - cube_
comment - div_
ceil - dp4a
- Expand method of
dp4a(). - elem_
type_ of - fma
- Expand method of
fma(). - index
- index_
mut - max
- max_nan
- Expansion of
max_nan(). - min
- min_nan
- Expansion of
min_nan(). - not
- plane_
all - Module containing the expand function for
plane_all(). - plane_
any - Module containing the expand function for
plane_any(). - plane_
ballot - Module containing the expand function for
plane_ballot(). - plane_
broadcast - Module containing the expand function for
plane_broadcast(). - plane_
elect - Module containing the expand function for
plane_elect(). - plane_
exclusive_ prod - Module containing the expand function for
plane_exclusive_prod(). - plane_
exclusive_ sum - Module containing the expand function for
plane_exclusive_sum(). - plane_
inclusive_ prod - Module containing the expand function for
plane_inclusive_prod(). - plane_
inclusive_ sum - Module containing the expand function for
plane_inclusive_sum(). - plane_
max - Module containing the expand function for
plane_max(). - plane_
min - Module containing the expand function for
plane_min(). - plane_
prod - Module containing the expand function for
plane_prod(). - plane_
shuffle - Module containing the expand function for
plane_shuffle(). - plane_
shuffle_ down - Module containing the expand function for
plane_shuffle_down(). - plane_
shuffle_ up - Module containing the expand function for
plane_shuffle_up(). - plane_
shuffle_ xor - Module containing the expand function for
plane_shuffle_xor(). - plane_
sum - Module containing the expand function for
plane_sum(). - polyfills
- push_
validation_ error - range
- range_
stepped - select
- select_
many - slice
- sub
- synchronization
- tma_
group_ commit - tma_
group_ wait - tma_
group_ wait_ read - tma_
store_ 1d - tma_
store_ 2d - tma_
store_ 3d - tma_
store_ 4d - tma_
store_ 5d - trigonometry
Macros§
- __
expand_ debug_ print - Print a formatted message using the target’s debug print facilities. The format string is target specific, but Vulkan and CUDA both use the C++ conventions. WGSL isn’t currently supported.
- __
expand_ seq - debug_
print - Print a formatted message using the target’s debug print facilities. The format string is target specific, but Vulkan and CUDA both use the C++ conventions. WGSL isn’t currently supported.
- define
- define_
scalar - Define a custom type to be used for a comptime scalar type. Useful for cases where generics can’t work.
- define_
size - Define a custom type to be used for a comptime size. Useful for cases where generics can’t work.
- expand_
assert - expand_
error - seq
- size
- unexpanded
Structs§
- Array
- A contiguous array of elements.
- Atomic
- An atomic numerical type wrapping a normal numeric primitive. Enables the use of atomic operations, while disabling normal operations. In WGSL, this is a separate type - on CUDA/SPIR-V it can theoretically be bitcast to a normal number, but this isn’t recommended.
- Buffer
Binding - Buffer representation with a reference to the server handle.
- Buffer
Compilation Arg - Comptime
Cell - A cell that can store and mutate a cube type during comptime.
- Comptime
Cell Expand - Expand type of
ComptimeCell. - Const
- Dynamic
Scalar - A fake element type that can be configured to map to any other element type.
- Dynamic
Size - A fake constant type that can be configured to map to any comptime value.
- Im2col
- Im2col indexing. Loads a “column” (not the same column as im2col) of pixels into shared
memory, with a certain offset (kernel position). The corners are the bounds to load pixels
from at offset 0, so the top left corner of the kernel. The offset is added to the
corner offsets, so a
(-1, -1)corner will stop the bounding box at(1, 1)for kernel offset(2, 2). - Im2col
Args - Args for im2col tensor maps
- Im2col
Compilation Arg - Im2col
Expand - Im2col
Launch - Im2col
Wide - 1D im2col, not properly supported yet
- Im2col
Wide Args - Args for im2col wide tensor maps
- Im2col
Wide Compilation Arg - Im2col
Wide Expand - Im2col
Wide Launch - Input
Scalar - A way to define an input scalar without a generic attached to it.
- Input
Scalar Compilation Arg - Input
Scalar Expand - Native
Expand - Expand type of a native GPU type, i.e. scalar primitives, arrays, shared memory.
- Option
Expand - Ordering
Expand - Owned
Tensor - Owned
Tensor Expand - Range
Expand - Range
From Expand - Range
Full Expand - Range
Inclusive Expand - Range
ToExpand - Range
ToInclusive Expand - Read
Only - Read
Write - Registry
- It is similar to a map, but where the keys are stored at comptime, but the values can be runtime variables.
- Runtime
Cell - Runtime
Cell Expand - Sequence
- A sequence of cube types that is inlined during compilation.
- Sequence
Arg - Sequence
Compilation Arg - Sequence
Expand - Expand type of Sequence.
- Shared
- Stepped
Range Expand - Tensor
- The tensor type is a wrapper around
[T]that comes with more metadata such as stride and shape. - Tensor
Binding - Tensor representation with a reference to the server handle, the strides and the shape.
- Tensor
Compilation Arg - Compilation argument for a tensor.
- Tensor
Expand - Tensor
Layout - Tensor
Map - A CUDA
CUtensorMapobject. Represents a tensor encoded with a lot of metadata, and is an opaque packed object at runtime. Does not support retrieving any shapes or strides, nor does it give access to the pointer. So these need to be passed separately in an aliasedTensorif needed. - Tensor
MapArg - Grid constant tensor map, currently only maps to CUDA tensormap. May be interleaved or swizzled, but last dimension must be contiguous (since strides don’t include the last dimension).
- Tensor
Meta - Tensor
Meta Compilation Arg - Tensor
Meta Expand - Tensor
Meta Launch - Tensor
Reinterpret - Tensor
View - Tensor
View Builder - Tensor
View Builder Compilation Arg - Tensor
View Builder Expand - Tensor
View Builder Launch - Tensor
View Expand - Tiled
- Regular tiled tensor map
- Tiled
Args - Args for tiled tensor maps
- Tiled
Compilation Arg - Tiled
Expand - Tiled
Launch - Vector
- A contiguous list of elements that supports auto-vectorized operations.
Enums§
- Buffer
Arg - Comptime
Option - Comptime
Option Args - Comptime
Option Compilation Arg - Comptime
Option Expand - OobFill
- What value to use when filling out of bounds values
- Option
Args - Option
Compilation Arg - Tensor
Arg - Argument to be used for tensors passed as arguments to kernels.
- Tensor
Clamp Mode - Tensor
MapFormat - Format of
TensorMap - Tensor
MapInterleave - Interleave setting for
TensorMap - Tensor
MapPrefetch - Additional prefetching to perform during load Specifies L2 fetch size which indicates the byte granularity at which L2 requests are filled from DRAM
- Tensor
MapSwizzle - Data are organized in a specific order in global memory; however, this may not match the order
in which the application accesses data in shared memory. This difference in data organization
may cause bank conflicts when shared memory is accessed. In order to avoid this problem, data
can be loaded to shared memory with shuffling across shared memory banks. When interleave is
TensorMapInterleave::B32, swizzle must beTensorMapSwizzle::B32. Other interleave modes can have any swizzling pattern.
Constants§
- ABSOLUTE_
POS - The position of the working unit in the whole cube kernel, without regards to cubes and axis.
- ABSOLUTE_
POS_ X - The index of the working unit in the whole cube kernel along the X axis, without regards to cubes.
- ABSOLUTE_
POS_ Y - The index of the working unit in the whole cube kernel along the Y axis, without regards to cubes.
- ABSOLUTE_
POS_ Z - The index of the working unit in the whole cube kernel along the Z axis, without regards to cubes.
- CUBE_
CLUSTER_ DIM - The total amount of cubes in a cluster.
- CUBE_
CLUSTER_ DIM_ X - The dimension of the cluster along the X axis.
- CUBE_
CLUSTER_ DIM_ Y - The dimension of the cluster along the Y axis.
- CUBE_
CLUSTER_ DIM_ Z - The dimension of the cluster along the Z axis.
- CUBE_
COUNT - The number of cubes launched.
- CUBE_
COUNT_ X - The number of cubes launched along the X axis.
- CUBE_
COUNT_ Y - The number of cubes launched along the Y axis.
- CUBE_
COUNT_ Z - The number of cubes launched along the Z axis.
- CUBE_
DIM - The total amount of working units in a cube.
- CUBE_
DIM_ X - The dimension of the cube along the X axis.
- CUBE_
DIM_ Y - The dimension of the cube along the Y axis.
- CUBE_
DIM_ Z - The dimension of the cube along the Z axis.
- CUBE_
POS - The cube position, without regards to axis.
- CUBE_
POS_ CLUSTER - The cube position within the cluster.
- CUBE_
POS_ CLUSTER_ X - The cube position in the cluster along the X axis.
- CUBE_
POS_ CLUSTER_ Y - The cube position in the cluster along the Y axis.
- CUBE_
POS_ CLUSTER_ Z - The cube position in the cluster along the Z axis.
- CUBE_
POS_ X - The cube position along the X axis.
- CUBE_
POS_ Y - The cube position along the Y axis.
- CUBE_
POS_ Z - The cube position along the Z axis.
- PLANE_
DIM - The total amount of working units in a plane.
- PLANE_
POS - The position of the plane within the cube (plane/warp/subgroup index).
- UNIT_
POS - The position of the working unit inside the cube, without regards to axis.
- UNIT_
POS_ PLANE - The relative position of the working unit inside the plane, without regards to cube dimensions.
- UNIT_
POS_ X - The position of the working unit inside the cube along the X axis.
- UNIT_
POS_ Y - The position of the working unit inside the cube along the Y axis.
- UNIT_
POS_ Z - The position of the working unit inside the cube along the Z axis.
Traits§
- Abs
- AbsExpand
- AbsNative
Expand - AddAssign
Expand - AddExpand
- AddNative
Expand - AndExpand
- ArcCos
- ArcCos
Expand - ArcCos
Native Expand - ArcCosh
- ArcCosh
Expand - ArcCosh
Native Expand - ArcSin
- ArcSin
Expand - ArcSin
Native Expand - ArcSinh
- ArcSinh
Expand - ArcSinh
Native Expand - ArcTan
- ArcTan2
- ArcTan2
Expand - ArcTan2
Native Expand - ArcTan
Expand - ArcTan
Native Expand - ArcTanh
- ArcTanh
Expand - ArcTanh
Native Expand - AsDeref
Expand - AsDeref
MutExpand - AsMut
Expand - Expand version of
AsMut. TheSelfversion must be implemented by allExpandTypes, sinceCubeCLalso uses it to implement&mut x. - AsRef
Expand - Expand version of
AsRef. LikeAsRef<Self>it’s implemented for allExpandTypes. This is called when the Rust code uses&x. - Assign
- Atomic
Numeric - BitAnd
Assign Expand - BitAnd
Expand - BitAnd
Native Expand - BitOr
Assign Expand - BitOr
Expand - BitOr
Native Expand - BitXor
Assign Expand - BitXor
Expand - BitXor
Native Expand - BoolOps
- Extension trait for bool.
- CanRead
Value - Cast
- Enable elegant casting from any to any
CubeElem - Ceil
- Ceil
Expand - Ceil
Native Expand - Clone
Expand - Compilation
Arg - Argument used during the compilation of kernels.
- Complex
Abs - Complex
AbsExpand - Complex
AbsNative Expand - Complex
Compare - Complex
Core - Complex
Core Expand - Complex
Math - Complex
Native Expand - Cos
- CosExpand
- CosNative
Expand - Cosh
- Cosh
Expand - Cosh
Native Expand - Count
Ones - Count
Ones Expand - CubeAdd
- Cube
AddAssign - CubeAnd
- Cube
BitAnd - Cube
BitAnd Assign - Cube
BitOr - Cube
BitOr Assign - Cube
BitXor - Cube
BitXor Assign - Cube
Comptime - A type that can be used as a kernel comptime argument.
Note that a type doesn’t need to implement
CubeComptimeto be used as a comptime argument. However, this facilitate the declaration of generic cube types. - Cube
Debug - CubeDiv
- Cube
DivAssign - Cube
Enum - Cube
Index - Trait bound that can be used to guarantee the expand also implements
IndexExpand - Cube
Index Mut - CubeMul
- Cube
MulAssign - CubeNeg
- CubeNot
- Cube
Option - Extensions for
Option - Cube
Option Default - Extensions for
Optionthat require default - CubeOr
- CubeOrd
- Cube
Ordering - Cube
Partial Eq - Cube
Partial Ord - Cube
Primitive - Form of
CubeTypethat encapsulates all primitive types: Numeric,UInt, Bool - Cube
Primitive Expand - CubeRem
- Cube
RemAssign - CubeShl
- Cube
ShlAssign - CubeShr
- Cube
ShrAssign - CubeSub
- Cube
SubAssign - Cube
Type - Types used in a cube function must implement this trait
- Default
Expand - Degrees
- Degrees
Expand - Degrees
Native Expand - Deref
Expand CubeCLversion ofDeref. Unlike those traits, this trait produces owned values directly. Maps to*x.- DivAssign
Expand - DivCeil
- DivCeil
Expand - DivExpand
- DivNative
Expand - Dot
- DotExpand
- DotNative
Expand - Erf
- ErfExpand
- ErfNative
Expand - Exp
- ExpExpand
- ExpNative
Expand - Expand
Type Clone - Expm1
- Expm1
Expand - Expm1
Native Expand - Find
First Set - Find
First SetExpand - Float
- Floating point numbers. Used as input in float kernels
- Float
Bits - Float
Bits Expand - Float
Ops - Float
OpsExpand - Floor
- Floor
Expand - Floor
Native Expand - HasValue
- Hypot
- Hypot
Expand - Hypot
Native Expand - Index
Expand - Index
MutExpand - Int
- Signed or unsigned integer. Used as input in int kernels
- Into
Comptime - Trait for marking a function return value as comptime when the compiler can’t infer it.
- Into
Expand - IntoMut
- Convert an expand type to a version with mutable registers when necessary.
- Into
Runtime - Trait useful to convert a comptime value into runtime value.
- Inverse
Sqrt - Inverse
Sqrt Expand - Inverse
Sqrt Native Expand - IsInf
- IsInf
Expand - IsNan
- IsNan
Expand - Launch
Arg - Defines how a launch argument can be expanded.
- Leading
Zeros - Leading
Zeros Expand - List
- Type from which we can read/to which we can write values in cube functions.
- List
Expand - Type from which we can read/to which we can write values in cube functions.
- Log
- Log1p
- Log1p
Expand - Log1p
Native Expand - LogExpand
- LogNative
Expand - Magnitude
- Magnitude
Expand - Magnitude
Native Expand - ModFloor
- ModFloor
Expand - ModFloor
Native Expand - MulAssign
Expand - MulExpand
- MulHi
- MulHi
Expand - MulHi
Native Expand - MulNative
Expand - Native
Assign - Trait for native types that can be assigned. For non-native composites, use the normal
Assign. - Native
Cube Type - NegExpand
- NegNative
Expand - Normalize
- Normalize
Expand - NotExpand
- Numeric
- Type that encompasses both (unsigned or signed) integers and floats Used in kernels that should work for both.
- OneExpand
- Option
Ext - OrExpand
- OrdExpand
- OrdNative
Expand - Partial
EqExpand - Partial
EqNative Expand - Partial
OrdExpand - Partial
OrdNative Expand - Plane
Numeric - Powf
- Powf
Expand - Powf
Native Expand - Powi
- Powi
Expand - Radians
- Radians
Expand - Radians
Native Expand - Read
Value - Read a value into registers. Should only be implemented for types that can exist outside of
memory like primitives or
Array, but not for things likeBarrierthat must exist behind a pointer. - Recip
- Recip
Expand - Recip
Native Expand - Registry
Query - To find an item from the registry, the query must be able to be translated to the actual key type.
- Reinterpret
- Enables reinterpetring the bits from any value to any other type of the same size.
- RemAssign
Expand - RemExpand
- RemNative
Expand - Reverse
Bits - Reverse
Bits Expand - Reverse
Bits Native Expand - Rhypot
- Rhypot
Expand - Rhypot
Native Expand - Round
- Round
Expand - Round
Native Expand - Runtime
Assign - Saturating
Add - Saturating
AddExpand - Saturating
AddNative Expand - Saturating
Sub - Saturating
SubExpand - Saturating
SubNative Expand - Scalar
- Marker trait for scalar primitives. Should be implemented for all scalar
CubePrimitives, but not forVectoror non-standard primitives likeBarrier. Alternatively, treat these as types that can be stored in a [Vector] - Scalar
Abs - Scalar
Add - Scalar
ArcCos - Scalar
ArcCosh - Scalar
ArcSin - Scalar
ArcSinh - Scalar
ArcTan - Scalar
ArcTan2 - Scalar
ArcTanh - Scalar
ArgSettings - Similar to [
ArgSettings], however only for scalar types that don’t depend on the [Runtime] trait. - Scalar
BitAnd - Scalar
BitOr - Scalar
BitXor - Scalar
Ceil - Scalar
Cos - Scalar
Cosh - Scalar
Degrees - Scalar
Div - Scalar
Dot - Scalar
Erf - Scalar
Exp - Scalar
Expm1 - Scalar
Floor - Scalar
Hypot - Scalar
Inverse Sqrt - Scalar
Log - Scalar
Log1p - Scalar
Magnitude - Scalar
ModFloor - Scalar
Mul - Scalar
MulHi - Scalar
Neg - Scalar
Ord - Scalar
Partial Eq - These
Scalartraits fix Rust’s broken inference on theScalarassociated type - Scalar
Partial Ord - Scalar
Powf - Scalar
Radians - Scalar
Recip - Scalar
Rem - Scalar
Reverse Bits - Scalar
Rhypot - Scalar
Round - Scalar
Saturating Add - Scalar
Saturating Sub - Scalar
Shl - Scalar
Shr - Scalar
Sin - Scalar
Sinh - Scalar
Sqrt - Scalar
Sub - Scalar
Tan - Scalar
Tanh - Scalar
Trunc - Scalar
Vector Sum - ShlAssign
Expand - ShlExpand
- ShlNative
Expand - ShrAssign
Expand - ShrExpand
- ShrNative
Expand - Sin
- SinExpand
- SinNative
Expand - Sinh
- Sinh
Expand - Sinh
Native Expand - Size
- Sized
Container - Sized
Container Expand - Slice
Ext - Slice
Operator - Slice
Operator Expand - Slice
Vector Ext - Slice
Visibility - Sqrt
- Sqrt
Expand - Sqrt
Native Expand - SubAssign
Expand - SubExpand
- SubNative
Expand - Tan
- TanExpand
- TanNative
Expand - Tanh
- Tanh
Expand - Tanh
Native Expand - Tensor
MapKind - Trailing
Zeros - Trailing
Zeros Expand - Trunc
- Trunc
Expand - Trunc
Native Expand - Vector
Sum - Vector
SumExpand - Vector
SumNative Expand - Vectorized
- Vectorized
Expand - Zero
Expand
Functions§
- __
expand_ assign - __
expand_ deref - broadcast_
value - cast_
value - clamp_
nan - Clamp a float scalar or vector, propagating NaN from the input or either bound.
- copy
- Copy one element between two array-likes without intermediates.
- copy_
bulk - Bulk copy
lengthelements between two array-likes without intermediates. - debug_
call_ expand - Calls a function and inserts debug symbols if debug is enabled.
- debug_
source_ expand - Adds source instruction if debug is enabled
- debug_
var_ expand - Registers name for an expand if possible
- div_
ceil - dp4a
- Packed int8×4 dot-product accumulate:
c + Σ a_i * b_ifor four signed bytes packed ina/b. - elem_
type_ of - fast_
math_ expand - fma
- Fused multiply-add
A*B+C. - from_
raw_ parts - init_
expand - into_
mut_ assign - max
- The maximum of two values, not requiring
Ord. Provided for clarity in certain cases, thoughclamp_minmay sometimes be more clear. - max_nan
- Floating-point maximum, propagating NaN from either operand.
- min
- The minimum of two values, not requiring
Ord. Provided for clarity in certain cases, thoughclamp_maxmay sometimes be more clear. - min_nan
- Floating-point minimum, propagating NaN from either operand.
- plane_
all - Perform a reduce all operation across all units in a plane.
- plane_
any - Perform a reduce any operation across all units in a plane.
- plane_
ballot - Perform a ballot operation across all units in a plane.
Returns a set of 32-bit bitfields as a
Vector, with each element containing the value from 32 invocations. Note that vector size will always be set to 4 even forPLANE_DIM <= 64, because we can’t retrieve the actual plane size at expand time. Use the runtimePLANE_DIMto index appropriately. - plane_
broadcast - Broadcasts the value from the specified plane unit at the given index
to all active units within that plane. Requires a constant index. For non-constant indices,
use
plane_shuffle(). - plane_
elect - Returns true if the cube unit has the lowest
plane_unit_idamong active unit in the plane - plane_
exclusive_ prod - Perform an exclusive product operation across all units in a plane.
This multiplies all values to the “left” of the unit, excluding this unit’s value. The 0th unit
will be set to
E::one(). Also known as “exclusive prefix product” or “exclusive scan”. - plane_
exclusive_ sum - Perform an exclusive sum operation across all units in a plane.
This sums all values to the “left” of the unit, excluding this unit’s value. The 0th unit will
be set to
E::zero(). Also known as “exclusive prefix sum” or “exclusive scan”. - plane_
inclusive_ prod - Perform an inclusive product operation across all units in a plane. This multiplies all values to the “left” of the unit, including this unit’s value. Also known as “prefix product” or “inclusive scan”.
- plane_
inclusive_ sum - Perform an inclusive sum operation across all units in a plane. This sums all values to the “left” of the unit, including this unit’s value. Also known as “prefix sum” or “inclusive scan”.
- plane_
max - Perform a reduce max operation across all units in a plane.
- plane_
min - Perform a reduce min operation across all units in a plane.
- plane_
prod - Perform a reduce prod operation across all units in a plane.
- plane_
shuffle - Perform an arbitrary lane shuffle operation across the plane. Each unit reads the value from the specified source lane.
- plane_
shuffle_ down - Perform a shuffle down operation across the plane.
Each unit reads the value from a unit with a higher lane ID (
current_id+ delta). A unit whoselane_id+ delta >=plane_dimreads an indeterminate value that differs by backend, so mask those units at the call site. - plane_
shuffle_ up - Perform a shuffle up operation across the plane.
Each unit reads the value from a unit with a lower lane ID (
current_id- delta). A unit withlane_id< delta reads an indeterminate value that differs by backend, so mask those units at the call site. - plane_
shuffle_ xor - Perform a shuffle XOR operation across the plane. Each unit exchanges its value with another unit at an index determined by XOR with the mask. This is useful for butterfly reduction patterns.
- plane_
sum - Perform a reduce sum operation across all units in a plane.
- printf_
expand - Prints a formatted message using the print debug layer in Vulkan, or
printfin CUDA. - push_
validation_ error - Push a validation error that will make kernel compilation fail.
- range
- integer range. Equivalent to:
- range_
stepped - Stepped range. Equivalent to:
- reinterpret_
value - select
- Executes both branches, then selects a value based on the condition. This should be branchless, but might depend on the compiler.
- select_
many - Same as
select()but with vectors instead. - tma_
group_ commit - Commit an async tensor operation. Not sure how this works, poor docs. But you need to call it after a write, but not after reads.
- tma_
group_ wait - Wait until at most
max_pendingTMA copy operations are in flight. - tma_
group_ wait_ read - Wait TMA copy operations have finished reading from shared memory, with at most
max_pendingoperations being unfinished. - tma_
store_ 1d - Copy a tile from a shared memory
srcto a global memorydst, with the provided offsets. Should be combined withmemcpy_async_tensor_commitandmemcpy_async_tensor_wait_read. - tma_
store_ 2d - Copy a tile from a shared memory
srcto a global memorydst, with the provided offsets. Should be combined withmemcpy_async_tensor_commitandmemcpy_async_tensor_wait_read. - tma_
store_ 3d - Copy a tile from a shared memory
srcto a global memorydst, with the provided offsets. Should be combined withmemcpy_async_tensor_commitandmemcpy_async_tensor_wait_read. - tma_
store_ 4d - Copy a tile from a shared memory
srcto a global memorydst, with the provided offsets. Should be combined withmemcpy_async_tensor_commitandmemcpy_async_tensor_wait_read. - tma_
store_ 5d - Copy a tile from a shared memory
srcto a global memorydst, with the provided offsets. Should be combined withmemcpy_async_tensor_commitandmemcpy_async_tensor_wait_read. - unary_
expand - unexpanded_
value - uninit_
local - Used for
let x;local bindings. These are technically immutable in Rust, but because they can be visible at a higher level scope than their assignment we need to allocate a slot of them at that level and treat them as mutable.