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?
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cutejax-0.1.4.tar.gz.
File metadata
- Download URL: cutejax-0.1.4.tar.gz
- Upload date:
- Size: 102.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8c222f87398eda23167b5f127894fdefc6ad82c56dd8d32973ec3fcefedb8b7
|
|
| MD5 |
c1d8f944f532ba174ce9a658eccb98df
|
|
| BLAKE2b-256 |
26c7aeccdfaf8dcdea6c99583a9c4494d7d0b12d8693499932a77f3f8dc4b201
|
Provenance
The following attestation bundles were made for cutejax-0.1.4.tar.gz:
Publisher:
release.yml on nshepperd/cutejax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cutejax-0.1.4.tar.gz -
Subject digest:
d8c222f87398eda23167b5f127894fdefc6ad82c56dd8d32973ec3fcefedb8b7 - Sigstore transparency entry: 2587571404
- Sigstore integration time:
-
Permalink:
nshepperd/cutejax@c479bae0801c42e8aa989e82f3f778bd5782dcb3 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/nshepperd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c479bae0801c42e8aa989e82f3f778bd5782dcb3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cutejax-0.1.4-py3-none-any.whl.
File metadata
- Download URL: cutejax-0.1.4-py3-none-any.whl
- Upload date:
- Size: 26.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4eedb653e9047dbc5cd16d5c6806fccc31ce93990898c3a7790ef8f485e6018
|
|
| MD5 |
b934ca777a8136f3c879434e64d8179a
|
|
| BLAKE2b-256 |
42c4dbe17948a1d41447b7c1da011e8c64427094b9f2699f17012ae65a44824b
|
Provenance
The following attestation bundles were made for cutejax-0.1.4-py3-none-any.whl:
Publisher:
release.yml on nshepperd/cutejax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cutejax-0.1.4-py3-none-any.whl -
Subject digest:
b4eedb653e9047dbc5cd16d5c6806fccc31ce93990898c3a7790ef8f485e6018 - Sigstore transparency entry: 2587571726
- Sigstore integration time:
-
Permalink:
nshepperd/cutejax@c479bae0801c42e8aa989e82f3f778bd5782dcb3 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/nshepperd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c479bae0801c42e8aa989e82f3f778bd5782dcb3 -
Trigger Event:
push
-
Statement type: