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

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.41
File Size Uploaded Provenance Actions
enceladus-0.1.41.tar.gz 385.6 kB Without provenance Details for enceladus-0.1.41.tar.gz

Built distributions (wheels)

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

Total release size: 1.5 MB

Release files / enceladus-0.1.41.tar.gz

Download URL enceladus-0.1.41.tar.gz
Size 385.6 kB
Tags Source
SHA-256 checksum
How to use checksums
bf0371aad4dd4a5adee53d16123305ef3ea62587e4110cf6cb1bf0ffe3777a93
BLAKE2b-256 checksum
How to use checksums
551b3b8e75fdfe756712368d6e8e15d6565e64f29e62ebe57cd1d04dbc0f7bc2
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.41-cp314-cp314-macosx_15_0_arm64.whl

Download URL enceladus-0.1.41-cp314-cp314-macosx_15_0_arm64.whl
Size 278.8 kB
Tags CPython 3.14 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
1ca2cbfdd8bd26fefd747188a363750b184c6d59671592347c0837e94af0e5fb
BLAKE2b-256 checksum
How to use checksums
bb4b569a83ea41bb5af6ab3d96e8aa2e2a1adbc8c924544f0f43ac2a46ce5eb8
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.41-cp313-cp313-macosx_15_0_arm64.whl

Download URL enceladus-0.1.41-cp313-cp313-macosx_15_0_arm64.whl
Size 278.7 kB
Tags CPython 3.13 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
93738400bb340d950185461d10ad151fb7d5cb92079acf9d43aa88b7daf607dc
BLAKE2b-256 checksum
How to use checksums
2063a9f05089b186858986e2f11f50d0df36861664817e96c6797f3e8658b3bb
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.41-cp312-cp312-macosx_15_0_arm64.whl

Download URL enceladus-0.1.41-cp312-cp312-macosx_15_0_arm64.whl
Size 278.7 kB
Tags CPython 3.12 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
dcf74f31c014fe921eeecc67fa29c558c01681d7c009befd4fd5986da97cd538
BLAKE2b-256 checksum
How to use checksums
08eaa8eb1576c241ad3794aec1c1a3c88b93d5a79d8cd52fd247665826f31b6f
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.41-cp311-cp311-macosx_15_0_arm64.whl

Download URL enceladus-0.1.41-cp311-cp311-macosx_15_0_arm64.whl
Size 279.3 kB
Tags CPython 3.11 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
5b47b4fa984e6571b469a414e2db6d501615e0bb7ae6fa143b35682dd26bb62c
BLAKE2b-256 checksum
How to use checksums
7e27d8cc1b0c6834f0c617682c2cbab32ea37aec4aae2fa2124cca04e6299255
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.41

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