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.39

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.39
File Size Uploaded Provenance Actions
enceladus-0.1.39.tar.gz 347.6 kB Without provenance Details for enceladus-0.1.39.tar.gz

Built distributions (wheels)

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

Total release size: 1.4 MB

Release files / enceladus-0.1.39.tar.gz

Download URL enceladus-0.1.39.tar.gz
Size 347.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1cf754754f0175904ec85d190732af42cd7d6eedb30c9a8084d2b64bfa53f23c
BLAKE2b-256 checksum
How to use checksums
5739ce4e4f24587dc35e5f63b50dec1394ddcd5777a868a302fb4b4514c82d30
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.39-cp314-cp314-macosx_15_0_arm64.whl

Download URL enceladus-0.1.39-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
f7e366d4f0a680aac3cf642bbcf4702d129f54389018adf0b44e02c5738ffcb5
BLAKE2b-256 checksum
How to use checksums
6503ede0bb629374ff46420657dcf22aa258bc3138e767ff644ce1c8e852a980
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.39-cp313-cp313-macosx_15_0_arm64.whl

Download URL enceladus-0.1.39-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
06353227c720f264cb6c0a4006a71b0a292c2203653f464379664941025fc6c6
BLAKE2b-256 checksum
How to use checksums
78365c0168fb946bea9e17ab0d2dd64f0e711c67e486df725e1699dd1e2c6834
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.39-cp312-cp312-macosx_15_0_arm64.whl

Download URL enceladus-0.1.39-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
c2dd5b8c72fc5e009432754ee007f5c7d05fe4913b55dd0e19cbcd44bdfa5704
BLAKE2b-256 checksum
How to use checksums
2d35df3f8cef904437b5675a5e3e9d50963dfe42bfac9a3e0880fa594228e3b1
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.39-cp311-cp311-macosx_15_0_arm64.whl

Download URL enceladus-0.1.39-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
b42f9f8d1864d6b8ee362b2bdeb577218dd206c1c820433046a09446c69da825
BLAKE2b-256 checksum
How to use checksums
556b73abd9a044148974a34226cf7e6b293d8f7dbed74d3be5b2c8d3c1cfac6d
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.39

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