Skip to content
tracel-aiPublic

About

CubeK: high-performance multi-platform kernels in CubeCL

Topics

Resources

Stars

136 stars

Watchers

2 watching

Forks

Repository files navigation

The CubeK illustration

Rust 1.92 or later License Current Crates.io Version Test Status
Discord Documentation

CubeK: high-performance multi-platform kernels in CubeCL


CubeK provides reusable compute kernels written in Rust with CubeCL. It powers core operations in Burn and can also be used directly in CubeCL applications, with specialized implementations for matrix multiplication, convolution, attention, reductions, and more.

Algorithms

Algorithms Variants
Random bernoulli normal uniform
Quantization symmetric per-block per-tensor q2 q4 q8 fp4
Reduction mean sum prod max min arg[max|min] per-cube per-plane
Matmul mma unit tma multi-stage specialization ordered multi-rows
Convolution mma unit tma multi-stage im2col
Attention mma unit multi-rows
Attention backward mma unit plane cube
Gated delta rule cube walk

Runtime configuration

CubeK loads runtime settings from cubek.toml or CubeK.toml in the current directory or a parent directory. Missing settings use defaults.

To disable automatic F32-to-TF32 conversion for matrix multiplication:

[matmul]
allow_tf32 = false

allow_tf32 defaults to true. Disabling it preserves F32 operands during automatic selection and may reduce performance.

Configuration is loaded on first use. Restart the application after editing the file; no recompilation is needed.

Contributing

If you want to contribute new kernels, please read the GUIDE.md.

Running tests

The full testing guide — suites, CUBE_TEST_MODE, failure-message format, and filter syntax — lives in cubek-test-utils.

About

CubeK: high-performance multi-platform kernels in CubeCL

Topics

Resources

Stars

136 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages