UMFPACK JAX FFI Extension
High-performance UMFPACK sparse direct solver with XLA FFI bindings for JAX. This eliminates the ~100ms pure_callback overhead when using UMFPACK within JAX's JIT-compiled code.
Prerequisites
macOS (Homebrew)
brew install suite-sparse nanobind
Ubuntu/Debian
sudo apt install libsuitesparse-dev
pip install nanobind
Fedora/RHEL
sudo dnf install suitesparse-devel
pip install nanobind
Build and Install
From this directory:
pip install .
Or for development:
pip install -e . -v
Usage
Once installed, VAJAX will automatically detect and use the FFI-based UMFPACK solver instead of the pure_callback version:
from vajax.sparse import umfpack_jax
# Check if FFI version is available
if umfpack_jax.is_available():
print("Using FFI-based UMFPACK")
# Solve sparse system Ax = b (CSR format)
x = umfpack_jax.solve(csr_indptr, csr_indices, csr_data, b)
Performance
| Operation | pure_callback | FFI |
|---|---|---|
| Solve overhead | ~100ms | ~0.1ms |
| c6288 solve | ~117ms | ~17ms |
| Newton-Raphson iteration | ~120ms | ~20ms |
The FFI version reduces per-solve overhead from ~100ms to ~0.1ms by eliminating Python callback marshaling, GIL acquisition, and host synchronization.
API
solve(indptr, indices, data, b) -> x
Solve Ax = b where A is in CSR format.
dot(indptr, indices, data, x) -> b
Compute b = A @ x (sparse matrix-vector multiply).
solve_transpose(indptr, indices, data, b) -> x
Solve A^T x = b (transpose solve, needed for autodiff).
clear_cache()
Clear the cached symbolic factorization. Call when switching between matrices with different sparsity patterns.
Architecture
The extension uses XLA FFI (Foreign Function Interface) to register UMFPACK operations directly as XLA custom calls, following the same pattern as klujax (KLU solver for JAX).
Key optimizations:
- Symbolic factorization cached for repeated solves
- CSR→CSC conversion done in C++ (UMFPACK requires column-major)
- No Python callback overhead within JIT-compiled code
- Thread-safe with mutex-protected cache
License
Same license as VAJAX (Apache 2.0).
Metadata
Release files for umfpack-jax 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| umfpack_jax-0.1.5-cp312-cp312-manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ x86-64 | Details |
| umfpack_jax-0.1.5-cp312-cp312-manylinux_2_28_aarch64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ ARM64 | Details |
| umfpack_jax-0.1.5-cp312-cp312-macosx_11_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 11.0+ ARM64 | Details |
| umfpack_jax-0.1.5-cp311-cp311-manylinux_2_28_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.28+ x86-64 | Details |
| umfpack_jax-0.1.5-cp311-cp311-manylinux_2_28_aarch64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.28+ ARM64 | Details |
| umfpack_jax-0.1.5-cp311-cp311-macosx_11_0_arm64.whl | CPython 3.11 | CPython 3.11 | macOS 11.0+ ARM64 | Details |
Total release size: 39.1 MB
Release files / umfpack_jax-0.1.5-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | umfpack_jax-0.1.5-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 13.0 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
811bceb33c286c55254a0340aa459b8ea2be781c2d23d3a89488d79d315dd8ca
|
|
BLAKE2b-256 checksum How to use checksums |
893826ed04671866388e5344de91042360430a628d8154729c3277a49faf49e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 5, 2026.
Transparency logRelease files / umfpack_jax-0.1.5-cp312-cp312-manylinux_2_28_aarch64.whl
| Download URL | umfpack_jax-0.1.5-cp312-cp312-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 5.9 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
6c03fc64ee5a065b570cef99aa95ab67cae98b090ec186dfef6b475046385146
|
|
BLAKE2b-256 checksum How to use checksums |
897f648053b78bdf3204f19d064e5e7dc715489359d427f2030412699c341317
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 5, 2026.
Transparency logRelease files / umfpack_jax-0.1.5-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | umfpack_jax-0.1.5-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 711.1 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f3a972497af50f1c9785cb6bc6adbfc5389a09d4a1bab6ab28f321b7867d4ba5
|
|
BLAKE2b-256 checksum How to use checksums |
ab5ad85e249d8c64294449e2cf3c27403848bd2c6aefe5cf7b3719df8b76e0de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 5, 2026.
Transparency logRelease files / umfpack_jax-0.1.5-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | umfpack_jax-0.1.5-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 13.0 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
230a63458d20ddf920188cc64b1df47962adcec28be4f6f0f1e950cda8f6fd78
|
|
BLAKE2b-256 checksum How to use checksums |
ac2766c072454515e7f0adf57ef2225efb18c825c3a0c7e95c2a36e93392f634
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 5, 2026.
Transparency logRelease files / umfpack_jax-0.1.5-cp311-cp311-manylinux_2_28_aarch64.whl
| Download URL | umfpack_jax-0.1.5-cp311-cp311-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 5.9 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
0d681febcee0a37023048be1ffc747647530ed13498d6d62d92b4a84cf9405cb
|
|
BLAKE2b-256 checksum How to use checksums |
5b933718686c5a6202432da6d1423a7cf7d62dbdd9103189a8d835fa3bf485d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 5, 2026.
Transparency logRelease files / umfpack_jax-0.1.5-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | umfpack_jax-0.1.5-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 711.5 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
197d96e909237e93e0e5d5ee5b1e6a47e81ebddbd3ea283b9b98b08c7e552f96
|
|
BLAKE2b-256 checksum How to use checksums |
4ea590d6490482fc6fe439cb1f5351a7347cc23517e35a2b5352d0430677575c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 5, 2026.
Transparency logSecurity for umfpack-jax 0.1.5
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.
Full provenance
All 6 files in this release have been uploaded with provenance metadata.
Attestation for umfpack_jax-0.1.5-cp312-cp312-manylinux_2_28_x86_64.whl
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 Mar 5, 2026.
Transparency logA 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.