cutejax
CuteDSL jax wrapper that adds some useful features, and is the best library ever.
What it adds over cutlass.jax.cutlass_call
- Pytree arguments that can contain code.
cutlass_callonly takes jax arrays.cutejax.calltakes any pytree: arrays become kernel tensors, everything else (callables, config objects,eqx.Modules) becomes part of the cache key and runs as codegen inside the trace. This is how FlashAttention-4 flex-attention masks work in examples/fa4_attention.py. Or in my actual fa4-jax library. - Per-dimension static/dynamic choice.
cutlass_callhas one all-or-nothinguse_static_tensorsflag.ArraySpec(static_dims=...)lets you bake some dims in and leave others symbolic — e.g. static heads/head_dim, dynamic batch/seqlen. - Tied dimensions.
ArraySpec(dim_names=...)makes two dims share one symbolic variable, so the compiler knows they're equal and the runtime checks it. - Small HLO.
cutlass_callembeds the compiled object file in the HLO at every call site; cutejax registers a named FFI target, so the HLO is just acustom_call. Dispatch speed is the same either way. This does mean that each kernel links in a new .so and uses a tvm-ffi dispatch slot, but there's 1024 slots so it's probably fine. - A compile watchdog. Turns a runaway trace into an error instead of letting it eat all your RAM. Apparently this happens in cutedsl if you try to iterate over a dynamically shaped array? Idk why you would be so silly as to do that. But still, this fixes it.
- Convenience.
cutejax.Moduleregisters with both jax's and cute's pytree registries;cutejax.condgives you data-dependent branches in undecorated code. - Caching. You can store compilation results in a redis cache for "blazing speed".
- Works on older jax. Tested on 0.8.2 through 0.11.0.
When to use the built-in instead
- You need non-row-major layouts.
cutlass_call'sTensorSpec(mode=...)can remap dimensions. But why would you even want that?
Metadata
Release files for cutejax 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cutejax-0.1.5.tar.gz | 103.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cutejax-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 130.8 kB
Release files / cutejax-0.1.5.tar.gz
| Download URL | cutejax-0.1.5.tar.gz |
|---|---|
| Size | 103.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7eab0fd492ff35ad9ca6db21f64d9a8e465c23bee40e5b97fc78dd1569309763
|
|
BLAKE2b-256 checksum How to use checksums |
edb8487c9386f1dc177aff958d80e0922d1ccc544680783e1bcc4f6e2ec4f3c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.
Transparency logRelease files / cutejax-0.1.5-py3-none-any.whl
| Download URL | cutejax-0.1.5-py3-none-any.whl |
|---|---|
| Size | 27.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db6cea66745bd1f298373f177a146a2bca0b5229c5a55b161d0fbae57c92530c
|
|
BLAKE2b-256 checksum How to use checksums |
e029b13ca39a3597c2f5263a0ce88abbe45455f3ed0f7a94efa942315c87a362
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.
Transparency log