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

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.76
File Size Uploaded Provenance Actions
enceladus-0.1.76.tar.gz 452.2 kB Without provenance Details for enceladus-0.1.76.tar.gz

Built distributions (wheels)

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

Total release size: 1.7 MB

Release files / enceladus-0.1.76.tar.gz

Download URL enceladus-0.1.76.tar.gz
Size 452.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f98759e33d022f060d2cf1dfba67d5f7e4c264714b9e445388c44d75caad1dc3
BLAKE2b-256 checksum
How to use checksums
abb8bb3b99f3080253418204066a493aaa17ddf64cdc2ae050d99349158c5b90
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.76-cp314-cp314-macosx_15_0_arm64.whl

Download URL enceladus-0.1.76-cp314-cp314-macosx_15_0_arm64.whl
Size 313.3 kB
Tags CPython 3.14 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
d8fd2bdab4a29a15cf1362cf3049def1c90de60d7cfff125595f7b7f7cdeee7b
BLAKE2b-256 checksum
How to use checksums
99ece3623972709dfe9103223996028858a20bcb98d5d5d91504ff0e921b2d5f
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.76-cp313-cp313-macosx_15_0_arm64.whl

Download URL enceladus-0.1.76-cp313-cp313-macosx_15_0_arm64.whl
Size 313.2 kB
Tags CPython 3.13 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
ff83849efa0c0ede37a3691783a24cecdd27ba992552366b387eddd069d9f2ce
BLAKE2b-256 checksum
How to use checksums
713f0c07d4e4a908979fc4a109e0363c768e190193056f530e6790d3ddc3df24
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.76-cp312-cp312-macosx_15_0_arm64.whl

Download URL enceladus-0.1.76-cp312-cp312-macosx_15_0_arm64.whl
Size 313.2 kB
Tags CPython 3.12 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
a8539c5b675760e2b2c43a16e530f8340d021da893418870dc03531d5ddecadf
BLAKE2b-256 checksum
How to use checksums
4b3662a86fde963c9cf4517327c590e3cf5b15579f44daa479ba30dd172441ed
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.76-cp311-cp311-macosx_15_0_arm64.whl

Download URL enceladus-0.1.76-cp311-cp311-macosx_15_0_arm64.whl
Size 313.8 kB
Tags CPython 3.11 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
0a2a70d0baeb6b8999839ac1b832939f90a7375b98979bcb5df8eda301f4242a
BLAKE2b-256 checksum
How to use checksums
db6b7fb6e7b9f56dbc48ed8fb0b9226ee630f0d43e80a5857210ad0c4ca5a356
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.76

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