JAXMg provides a C++ interface between JAX and cuSolverMg, NVIDIA's multi-GPU linear solver.
Project description
JAXMg: A distributed linear solver in JAX with cuSolverMg
JAXMg
JAXMg provides a C++ interface between JAX and cuSolverMg, NVIDIA’s multi-GPU linear solver. We provide a jittable API for the following routines.
- cusolverMgPotrs: Solves the system of linear equations: $Ax=b$ where $A$ is an $N\times N$ symmetric (Hermitian) positive-definite matrix via a Cholesky decomposition
- cusolverMgPotrs: Computes the inverse of an $N\times N$ symmetric (Hermitian) positive-definite matrix via a Cholesky decomposition.
- cusolverMgPotrs: Computes eigenvalues and eigenvectors of an $N\times N$ symmetric (Hermitian) matrix.
For more details, see the API.
The provided binary is compiled with:
| Component | Version |
|---|---|
| GCC | 11.5.0 |
| CUDA | 12.8.0 |
| cuDNN | 9.2.0.82-12 |
!!! Compatibility We require JAX>=0.6.0, since it ships with CUDA 12.x binaries, which this package relies on. No local version of CUDA is required.
Installation
Clone the repository and install with:
pip install ".[cuda]"
This will install a GPU compatible version of JAX.
To verify the installation (requires at least one GPU) run
pytest
There are two types of tests:
- SPMD tests: Single Process Multiple GPU tests.
- MPMD: Multiple Processes Multiple GPU tests.
cuSolverMp
As of CUDA 13, there is a new distributed linear algebra library called cuSolverMp with similar capabilities as cuSolverMg, that does support multi-node computations as well as >16 devices. Given the similarities in syntax, it should be straightforward to eventually switch to this API. This will require sharding data into a cyclic 2D form and handling the solver orchestration with MPI.
Citations
(Citation details will be available soon.)
Acknowledgements
I acknowledge support from the Flatiron Institute. The Flatiron Institute is a division of the Simons Foundation.
Project details
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 jaxmg-0.0.2.tar.gz.
File metadata
- Download URL: jaxmg-0.0.2.tar.gz
- Upload date:
- Size: 25.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd17353ece8a33d75a7096df93473988c66a3b66c2a2229a01a57b59fc6e0855
|
|
| MD5 |
4a484d39d4bc92826d6d15078eca6d5a
|
|
| BLAKE2b-256 |
a33b348d81767c0c6de9d5dbe730aa80f773bb5d09bb1ce4071f685a9eb8eaa0
|
File details
Details for the file jaxmg-0.0.2-py3-none-any.whl.
File metadata
- Download URL: jaxmg-0.0.2-py3-none-any.whl
- Upload date:
- Size: 26.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a63033931deeffe76f9a41579cdb06adc59047386bb9248ed318f43010fa6985
|
|
| MD5 |
18624eb1ef48455cb2117b97a38a333d
|
|
| BLAKE2b-256 |
b7c3afd0a745f97878d30bab5e1b12056f188a954f6613705c4dfb089140803a
|