Skip to main content

Enceladus

Enceladus is a Triton-like Python language for writing GPU kernels for Apple silicon Macs. You write a kernel as a Python function that operates on tiles, and Enceladus compiles it to Metal Shading Language and runs it on the GPU. You don't need Xcode or the Metal toolchain. Kernels accept NumPy arrays, PyTorch mps tensors, and MLX arrays.

Install

Enceladus needs an Apple silicon Mac with macOS 15 or later and Python 3.11 or later. To install it, run the following command:

uv add enceladus

For PyTorch or MLX support, add the torch or mlx extra: uv add "enceladus[torch]".

Example

The following program adds two vectors on the GPU:

import numpy as np

import enceladus
import enceladus.language as tl


@enceladus.jit
def add_kernel(x_ptr, y_ptr, out_ptr, n, BLOCK: tl.constexpr):
    offs = tl.program_id(0) * BLOCK + tl.arange(0, BLOCK)
    mask = offs < n
    x = tl.load(x_ptr + offs, mask=mask)
    y = tl.load(y_ptr + offs, mask=mask)
    tl.store(out_ptr + offs, x + y, mask=mask)


x = np.random.default_rng(0).standard_normal(100_000, dtype=np.float32)
y = np.ones_like(x)
out = np.empty_like(x)
add_kernel[(enceladus.cdiv(x.size, 1024),)](x, y, out, x.size, BLOCK=1024)
np.testing.assert_allclose(out, x + y)

To run a kernel on the CPU for debugging, set ENCELADUS_INTERPRET=1.

Learn more

To build from source, run uv sync, and then run the tests with uv run pytest -q.

Metadata

Release files for enceladus 0.1.38

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for enceladus 0.1.38
File Size Uploaded Provenance Actions
enceladus-0.1.38.tar.gz 347.6 kB Without provenance Details for enceladus-0.1.38.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for enceladus 0.1.38
File Actions
enceladus-0.1.38-cp314-cp314-macosx_15_0_arm64.whl CPython 3.14 CPython 3.14 macOS 15.0+ ARM64 Details for enceladus-0.1.38-cp314-cp314-macosx_15_0_arm64.whl
enceladus-0.1.38-cp313-cp313-macosx_15_0_arm64.whl CPython 3.13 CPython 3.13 macOS 15.0+ ARM64 Details for enceladus-0.1.38-cp313-cp313-macosx_15_0_arm64.whl
enceladus-0.1.38-cp312-cp312-macosx_15_0_arm64.whl CPython 3.12 CPython 3.12 macOS 15.0+ ARM64 Details for enceladus-0.1.38-cp312-cp312-macosx_15_0_arm64.whl
enceladus-0.1.38-cp311-cp311-macosx_15_0_arm64.whl CPython 3.11 CPython 3.11 macOS 15.0+ ARM64 Details for enceladus-0.1.38-cp311-cp311-macosx_15_0_arm64.whl

Total release size: 1.4 MB

Release files / enceladus-0.1.38.tar.gz

Download URL enceladus-0.1.38.tar.gz
Size 347.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0e2a658f77aabfac3cf02372355661a2dbbba5c1bf189ff5ec8a017c65503151
BLAKE2b-256 checksum
How to use checksums
3e6e88d534c3a7afed5f8d00ee9cb87e6b15f5c265018eef2074199c88b294af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / enceladus-0.1.38-cp314-cp314-macosx_15_0_arm64.whl

Download URL enceladus-0.1.38-cp314-cp314-macosx_15_0_arm64.whl
Size 254.2 kB
Tags CPython 3.14 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
407b0377cf8c26a420bf40bc9037230af5a48da7b398d5745ab9a16f7165b169
BLAKE2b-256 checksum
How to use checksums
c04557be003422b22d1b9c8f61f39cfa2867f2030820181ceb9b2fef6d3b8026
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / enceladus-0.1.38-cp313-cp313-macosx_15_0_arm64.whl

Download URL enceladus-0.1.38-cp313-cp313-macosx_15_0_arm64.whl
Size 254.1 kB
Tags CPython 3.13 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
92eb801eaa31e2b7850e20b6aa89f590bff9c511a318d548fa3d5163e8bc6f06
BLAKE2b-256 checksum
How to use checksums
d21d7320cf64ec1801a4199fbe0b3cd7d06feedcecaed9e7fc09061f0639c761
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / enceladus-0.1.38-cp312-cp312-macosx_15_0_arm64.whl

Download URL enceladus-0.1.38-cp312-cp312-macosx_15_0_arm64.whl
Size 254.1 kB
Tags CPython 3.12 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
7e25c04aef13262ae6d5ee789a800fc89253eaa2b4cd2678f8c52651b2a682bd
BLAKE2b-256 checksum
How to use checksums
4bc75e5d96d87a09fefc814cd4e4f14723eb3c05352a99e5362da8193dc14a8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / enceladus-0.1.38-cp311-cp311-macosx_15_0_arm64.whl

Download URL enceladus-0.1.38-cp311-cp311-macosx_15_0_arm64.whl
Size 254.6 kB
Tags CPython 3.11 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
c63c02f7738401df7d264df3f7e4b5261dc10040ab09e2954b800592aed5d199
BLAKE2b-256 checksum
How to use checksums
8c171c8817dbe99961760008e31901e0ea3edf5e482d741d3bd690ec5dedc587
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for enceladus 0.1.38

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page