Enceladus v0.1.0 · alpha
Language referenceAll pages
OverviewQuickstartProgramming modelMemory and synchronizationLanguage referenceDebuggingFramework interopPerformanceBenchmarksPorting from Triton

Reference

Language reference

Every builtin in enceladus.language, imported as tl, and the host API in enceladus. Tile shapes must be compile-time powers of two. Most math and shape functions are also tile methods, for example x.exp(), x.sum(axis=0), x.to(tl.float16), and x.T.

Builtins

Data types

The following table lists the element types. Pass them as tl.float16 in a kernel, or as the string "float16" to the host allocators.

KindTypesShort names
Booleantl.int1i1, bool
Signed integertl.int8, tl.int16, tl.int32, tl.int64i8, i16, i32, i64
Unsigned integertl.uint8, tl.uint16, tl.uint32, tl.uint64u8, u16, u32, u64
Floating pointtl.float16, tl.bfloat16, tl.float32fp16, bf16, fp32

Environment variables

VariableEffect
ENCELADUS_INTERPRET=1Runs kernels in the NumPy interpreter on the CPU.
ENCELADUS_DEBUG=1Compiles tl.device_assert checks. It's part of the specialization, so changing it recompiles.
ENCELADUS_DUMP=1Writes each compiled kernel's IR, MSL, and meta.json to its cache entry and prints the path.
ENCELADUS_CACHE_DIRMoves the disk cache from ~/.cache/enceladus.
ENCELADUS_ALWAYS_COMPILE=1Ignores the disk cache and saved autotuning results.
ENCELADUS_OVERRIDE_DIRLoads DIR/KERNEL_NAME.metal instead of the generated MSL.
ENCELADUS_VERIFY=1Verifies the IR after every compiler pass, including for interpreted launches.
ENCELADUS_PRINT_AUTOTUNING=1Prints each autotuning winner as a pasteable enceladus.Config(...).
ENCELADUS_FLUSH_EVERYSets the number of launches per command buffer. The default is 64.
MTL_CAPTURE_ENABLED=1A Metal variable that enceladus.capture needs at process start.