Skip to content
Discussion options

You must be logged in to vote

CubeK is the kernel library behind Burn's CubeCL backends, so you're already using it. burn-cuda, burn-rocm, burn-wgpu (Vulkan/Metal/WebGPU) and burn-cpu are all built on burn-cubecl, and that crate calls CubeK for matmul, convolution, attention, reductions, random sampling and quantization. For example, tensor.matmul() on the CUDA backend ends up in cubek::matmul::launch::launch_ref. The NdArray, LibTorch and Candle backends don't use it.

So for the same op there's no "Burn vs CubeK" speed difference: it's the same kernel. With the default autotune feature, Burn benchmarks CubeK's variants on your device the first time it sees a given shape and keeps the fastest. For attention, it uses C…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@laggui
Comment options

@Medamineelkhattabi
Comment options

@CytITDchen
Comment options

Answer selected by CytITDchen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants