Skip to main content

cutejax

cutedsl jax wrapper that adds some useful features. Mostly written by Fable, so caveat claudor. But it seems to work.

What it adds over cutlass.jax.cutlass_call

  • Pytree arguments that can contain code. cutlass_call only takes jax arrays. cutejax.call takes 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.
  • Per-dimension static/dynamic choice. cutlass_call has one all-or-nothing use_static_tensors flag. 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_call embeds the compiled object file in the HLO at every call site; cutejax registers a named FFI target, so the HLO is just a custom_call. Dispatch speed is the same either way.
  • A compile watchdog. Turns a runaway trace into an error instead of letting it eat all your RAM.
  • Convenience. cutejax.Module registers with both jax's and cute's pytree registries; cutejax.cond gives you data-dependent branches in undecorated code.
  • Works on older jax. Tested on 0.8.2 through 0.11.0.

When to use the built-in instead

  • You only pass arrays in and get arrays out — then cutejax buys you nothing.
  • You need non-row-major layouts. cutlass_call's TensorSpec(mode=...) can remap dimensions; cutejax can't, because the XLA FFI boundary doesn't carry strides, and rejects those layouts up front rather than reading them wrong.
  • You'd rather depend only on things NVIDIA ships and supports. cutejax needs jax-tvm-ffi, and is one person's side project.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cutejax-0.1.2.tar.gz (101.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cutejax-0.1.2-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file cutejax-0.1.2.tar.gz.

File metadata

  • Download URL: cutejax-0.1.2.tar.gz
  • Upload date:
  • Size: 101.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cutejax-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3bc36c41f6ed24a9e47e78a60ca01b80552f1e3b8b1a2b4f9b6fb9da2b8bb3fe
MD5 c481a77ee00cd6579e12f4e01a8ae2f5
BLAKE2b-256 2feb336d5922f8bdc8d2994e291903de92d86c526ff0e52166a21686f161b746

See more details on using hashes here.

Provenance

The following attestation bundles were made for cutejax-0.1.2.tar.gz:

Publisher: release.yml on nshepperd/cutejax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cutejax-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: cutejax-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 26.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cutejax-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 74ae718f03342c6cd660f29dd9787c8b75bbbe968da12a1d825996082382bfd5
MD5 e4a0cd1a368092d1b731af8bdd34fdad
BLAKE2b-256 18ff5001a81746fff4866b6fe137176d9561c27d82efc866ed96812046ac63f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for cutejax-0.1.2-py3-none-any.whl:

Publisher: release.yml on nshepperd/cutejax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.4

2 files

0.1.3

2 files

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

2 files

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