Enceladus v0.1.0 · alpha
All examplesExamples pages
All examplesVector addRow softmaxLayerNormMatrix multiplicationFused GELURMSNormMatmul with bias and GELUFlash attentionHistogramCumulative sum

Examples

Examples

Ten complete kernels from the repository's examples/ directory, from a vector add to flash attention. Each one checks its result against a NumPy reference and prints the error.

Run an example

Each example is a standalone Python file with a kernel, a host wrapper, a NumPy reference, and a short demo. To run one, follow these steps:

  1. Clone the repository and change to its directory:
    shell
    git clone https://github.com/kashifulhaque/enceladus
    cd enceladus
  2. Install the dependencies:
    shell
    uv sync
  3. Run an example:
    shell
    uv run python examples/01_vector_add.py

To run an example on the CPU instead of the GPU, set ENCELADUS_INTERPRET=1, for example ENCELADUS_INTERPRET=1 uv run python examples/03_layernorm.py. For more information about the interpreter, see Debugging.

All examples