Enceladus v0.1.0 · alpha
IntroductionDocs pages
IntroductionQuickstartProgramming modelMemory and synchronizationDebuggingFramework interopPerformancePorting from Triton

Get started

Introduction

Enceladus is a Triton-style language for writing GPU kernels in Python. It compiles tile programs to Metal Shading Language while your program runs, and runs them on any Apple silicon GPU.

Write the tile, not the thread

You write an Enceladus kernel as a Python function that operates on tiles: blocks of values that one program computes on at once, like small NumPy arrays. The compiler decides which thread holds which element, lowers tl.dot to the GPU's SIMD-group matrix instructions, and hands the resulting MSL to Metal's newLibraryWithSource.

If you know Triton, you already know most of Enceladus. The decorator, the launch syntax, tl.constexpr, masks, and the autotuner work the same way.

no toolchain

Compiles at run time

Metal compiles the generated MSL in your process. Results are cached on disk, so later runs load in under 10 ms.

interop

Bring your arrays

Pass NumPy arrays, PyTorch mps tensors, MLX arrays, or enceladus.Tensor objects directly to a kernel.

ENCELADUS_INTERPRET=1

Debug on the CPU

The NumPy interpreter runs the same kernel with print(), pdb, and bounds-checked loads.

CompilationError

No silent miscompiles

Every unsupported construct is refused with the file, line, column, and a suggested fix.

tl.dot

Two matmul backends

Use simdgroup_matrix on every Apple GPU, or Metal 4 matmul2d for eligible loops.

@enceladus.autotune

Tuned per GPU

The autotuner compiles candidates in parallel, times them with GPU timestamps, and saves the winner.

What's in the docs

For every tl function and host API, see the Reference. For complete programs, see the Examples.

Project status

Enceladus is alpha software. Keep the following in mind:

  • All published performance numbers come from one M4 Pro. Wheels target macOS 15 but have been tested only on later releases.
  • The interpreter runs some kernels that the compiler refuses, such as a tl.dot whose K isn't a multiple of 8. It warns about them unless ENCELADUS_VERIFY=0, and raises the compiler's error when ENCELADUS_VERIFY=1.
  • MLX launches synchronize, at about 125 µs each, unless you turn on lazy launches with enceladus.lazy_mlx(True). A lazy launch applies only when every array the kernel writes is a fresh output.
  • atomic_add doesn't support float16 or bfloat16.

To report a problem, open an issue on GitHub.