UMFPACK FFI bindings for JAX - high-performance sparse direct solver
Project description
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).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
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 umfpack_jax-0.1.5-cp312-cp312-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: umfpack_jax-0.1.5-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 13.0 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
811bceb33c286c55254a0340aa459b8ea2be781c2d23d3a89488d79d315dd8ca
|
|
| MD5 |
4bf67d6afaf26737f20404eef18f1845
|
|
| BLAKE2b-256 |
893826ed04671866388e5344de91042360430a628d8154729c3277a49faf49e4
|
Provenance
The following attestation bundles were made for umfpack_jax-0.1.5-cp312-cp312-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on ChipFlow/vajax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
umfpack_jax-0.1.5-cp312-cp312-manylinux_2_28_x86_64.whl -
Subject digest:
811bceb33c286c55254a0340aa459b8ea2be781c2d23d3a89488d79d315dd8ca - Sigstore transparency entry: 1044319088
- Sigstore integration time:
-
Permalink:
ChipFlow/vajax@5f7614b79a5cb7fb36053333dd44ea2827af8a68 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/ChipFlow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5f7614b79a5cb7fb36053333dd44ea2827af8a68 -
Trigger Event:
push
-
Statement type:
File details
Details for the file umfpack_jax-0.1.5-cp312-cp312-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: umfpack_jax-0.1.5-cp312-cp312-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 5.9 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c03fc64ee5a065b570cef99aa95ab67cae98b090ec186dfef6b475046385146
|
|
| MD5 |
8508b35581b59757c8460b76d5dc6d28
|
|
| BLAKE2b-256 |
897f648053b78bdf3204f19d064e5e7dc715489359d427f2030412699c341317
|
Provenance
The following attestation bundles were made for umfpack_jax-0.1.5-cp312-cp312-manylinux_2_28_aarch64.whl:
Publisher:
release.yml on ChipFlow/vajax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
umfpack_jax-0.1.5-cp312-cp312-manylinux_2_28_aarch64.whl -
Subject digest:
6c03fc64ee5a065b570cef99aa95ab67cae98b090ec186dfef6b475046385146 - Sigstore transparency entry: 1044319326
- Sigstore integration time:
-
Permalink:
ChipFlow/vajax@5f7614b79a5cb7fb36053333dd44ea2827af8a68 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/ChipFlow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5f7614b79a5cb7fb36053333dd44ea2827af8a68 -
Trigger Event:
push
-
Statement type:
File details
Details for the file umfpack_jax-0.1.5-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: umfpack_jax-0.1.5-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 711.1 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3a972497af50f1c9785cb6bc6adbfc5389a09d4a1bab6ab28f321b7867d4ba5
|
|
| MD5 |
4430c705200b7fa8fe12e9e36925a7e7
|
|
| BLAKE2b-256 |
ab5ad85e249d8c64294449e2cf3c27403848bd2c6aefe5cf7b3719df8b76e0de
|
Provenance
The following attestation bundles were made for umfpack_jax-0.1.5-cp312-cp312-macosx_11_0_arm64.whl:
Publisher:
release.yml on ChipFlow/vajax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
umfpack_jax-0.1.5-cp312-cp312-macosx_11_0_arm64.whl -
Subject digest:
f3a972497af50f1c9785cb6bc6adbfc5389a09d4a1bab6ab28f321b7867d4ba5 - Sigstore transparency entry: 1044319200
- Sigstore integration time:
-
Permalink:
ChipFlow/vajax@5f7614b79a5cb7fb36053333dd44ea2827af8a68 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/ChipFlow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5f7614b79a5cb7fb36053333dd44ea2827af8a68 -
Trigger Event:
push
-
Statement type:
File details
Details for the file umfpack_jax-0.1.5-cp311-cp311-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: umfpack_jax-0.1.5-cp311-cp311-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 13.0 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
230a63458d20ddf920188cc64b1df47962adcec28be4f6f0f1e950cda8f6fd78
|
|
| MD5 |
4c40611773d631f0c90d89a5b8c5d284
|
|
| BLAKE2b-256 |
ac2766c072454515e7f0adf57ef2225efb18c825c3a0c7e95c2a36e93392f634
|
Provenance
The following attestation bundles were made for umfpack_jax-0.1.5-cp311-cp311-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on ChipFlow/vajax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
umfpack_jax-0.1.5-cp311-cp311-manylinux_2_28_x86_64.whl -
Subject digest:
230a63458d20ddf920188cc64b1df47962adcec28be4f6f0f1e950cda8f6fd78 - Sigstore transparency entry: 1044319142
- Sigstore integration time:
-
Permalink:
ChipFlow/vajax@5f7614b79a5cb7fb36053333dd44ea2827af8a68 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/ChipFlow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5f7614b79a5cb7fb36053333dd44ea2827af8a68 -
Trigger Event:
push
-
Statement type:
File details
Details for the file umfpack_jax-0.1.5-cp311-cp311-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: umfpack_jax-0.1.5-cp311-cp311-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 5.9 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d681febcee0a37023048be1ffc747647530ed13498d6d62d92b4a84cf9405cb
|
|
| MD5 |
7d45837bb23a3823661a2711e5513396
|
|
| BLAKE2b-256 |
5b933718686c5a6202432da6d1423a7cf7d62dbdd9103189a8d835fa3bf485d0
|
Provenance
The following attestation bundles were made for umfpack_jax-0.1.5-cp311-cp311-manylinux_2_28_aarch64.whl:
Publisher:
release.yml on ChipFlow/vajax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
umfpack_jax-0.1.5-cp311-cp311-manylinux_2_28_aarch64.whl -
Subject digest:
0d681febcee0a37023048be1ffc747647530ed13498d6d62d92b4a84cf9405cb - Sigstore transparency entry: 1044319409
- Sigstore integration time:
-
Permalink:
ChipFlow/vajax@5f7614b79a5cb7fb36053333dd44ea2827af8a68 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/ChipFlow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5f7614b79a5cb7fb36053333dd44ea2827af8a68 -
Trigger Event:
push
-
Statement type:
File details
Details for the file umfpack_jax-0.1.5-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: umfpack_jax-0.1.5-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 711.5 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
197d96e909237e93e0e5d5ee5b1e6a47e81ebddbd3ea283b9b98b08c7e552f96
|
|
| MD5 |
c1d1a35f7f736433a1f64579167d655b
|
|
| BLAKE2b-256 |
4ea590d6490482fc6fe439cb1f5351a7347cc23517e35a2b5352d0430677575c
|
Provenance
The following attestation bundles were made for umfpack_jax-0.1.5-cp311-cp311-macosx_11_0_arm64.whl:
Publisher:
release.yml on ChipFlow/vajax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
umfpack_jax-0.1.5-cp311-cp311-macosx_11_0_arm64.whl -
Subject digest:
197d96e909237e93e0e5d5ee5b1e6a47e81ebddbd3ea283b9b98b08c7e552f96 - Sigstore transparency entry: 1044319260
- Sigstore integration time:
-
Permalink:
ChipFlow/vajax@5f7614b79a5cb7fb36053333dd44ea2827af8a68 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/ChipFlow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5f7614b79a5cb7fb36053333dd44ea2827af8a68 -
Trigger Event:
push
-
Statement type: