Crate cubecl

Source

Re-exports§

pub use cubecl_linalg as linalg;

Modules§

benchmark
Module for benchmarking any executable part
channel
Compute channel module.
client
Compute client module.
codegen
compute
frontend
Cube Frontend Types.
future
Future utils with a compatible API for native, non-std and wasm environments.
ir
Cube Language Internal Representation.
prelude
server
Compute server module.
tune
Autotune module

Macros§

comment
Insert a literal comment into the kernel source code.
comptime
Mark the contents of this macro as compile time values, turning off all expansion for this code and using it verbatim
cpa
Cube Pseudo Assembly.
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.
debug_print_expand
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.
unexpanded

Structs§

CubeDim
Execution
InplaceMapping
Simply indicate the output that can be replaced by the input.
KernelExpansion
The information necessary to compile a kernel definition.
KernelId
Kernel unique identifier.
KernelIntegrator
The kernel integrator allows you to create a kernel definition based on kernel expansion and kernel settings.
KernelSettings
Metadata
Helper to calculate metadata offsets based on buffer count and position
MetadataBuilder
Builder for a serialized metadata struct
flex32
A floating point type with relaxed precision, minimum f16, max [f32].
tf32
A 19-bit floating point type implementing the tfloat32 format.

Enums§

AtomicFeature
CubeCount
Specifieds the number of cubes to be dispatched for a kernel.
CubeCountSettings
The position of the input or output to calculate the number of cubes to launch.
ExecutionMode
The kind of execution to be performed.
Feature
Every feature that can be supported by a cube runtime.
InputInfo
Information related to an input.
MemoryConfiguration
High level configuration of memory management.
OutputInfo
Information related to an output.

Constants§

PLANE_DIM_APPROX
An approximation of the plane dimension.

Traits§

Compiler
Compiles the representation into its own representation that can be formatted into tokens.
CompilerRepresentation
Trait for compiled code representation
CubeElement
The base element trait for the jit backend.
Kernel
Implement this trait to create a kernel definition.
Runtime
Runtime for the CubeCL.

Functions§

bool_elem
calculate_cube_count_elemwise
Calculate the number of cubes required to execute an operation where one cube unit is assigned to one element.
calculate_num_elems_dyn_rank
tensor_line_size
tensor_line_size_parallel
Find the maximum line size usable for parallel vectorization along the given axis from the supported line sizes or return 1 if vectorization is impossible.
tensor_line_size_perpendicular
Find the maximum line size usable for perpendicular vectorization along the given axis from the supported line sizes or return 1 if vectorization is impossible.
tensor_vectorization_factor

Type Aliases§

RuntimeArg
Runtime arguments to launch a kernel.

Attribute Macros§

cube
Mark a cube function, trait or implementation for expansion.
tune
Crates a tuning set with a specific signature. Should return a tuple of benchmark inputs.

Derive Macros§

AutotuneKey
Implements display and initialization for autotune keys.
CubeLaunch
Derive macro to define a cube type that is launched with a kernel
CubeType
Derive macro to define a cube type that is not launched