PMIx bootstrap method for modern AI/ML applications
Project description
Rixa
[!WARNING] This library is in an experimental phase and may be buggy. Expect breaking changes between versions.
Rixa (Runtime Initialization by pmiX Adoption) is a high-performance library that provides a unified and efficient way to bootstrap distributed PyTorch jobs. It leverages PMIx 5.0 to seamlessly launch PyTorch workloads on large-scale HPC clusters, eliminating the need to manually specify the master IP address and port.
Why Rixa?
Standard PyTorch bootstrapping (TCP/File-store) is built for cloud portability but often
struggles with scale and reliability on bare-metal HPC clusters.
rixa bypasses these overheads by using PMIx as a native high-performance key-value store, providing
-
Zero-config Launching: No master IP/Port orchestration required.
-
HPC Native: Leverages existing Slurm, Flux, or OpenMPI environments.
-
ABI Compatibility: Built on PMIx 5.0+ (ABI stable), ensuring portability across different MPI/PMIx versions.
Installation
[!NOTE] For detailed installation instructions, see the wiki.
In order to install one needs to specify the version of the library. Currently two versions are supported, pytorch and nvshmem.
They can be easily installed with
# Install for PyTorch support
pip install "rixa[pytorch]"
# Install for NVSHMEM support
pip install "rixa[nvshmem]"
Usage
[!NOTE] For more use cases, see the wiki.
PyTorch
One can use rixa to start PyTorch distributed job with one simple line
import rixa
rixa.pytorch.init_process_group(pytorch_argument1, pytorch_argument2, keyword2=pytorch_parameter)
Jobs can be launched with any PMIx 5.0-compatible plugin, starting with prrte, some MPI implementations (OpenMPI 5.0),
native job launcher plugins to SLURM or Flux. Example:
prterun -n 16 python3 -c "import rixa; rixa.pytorch.init_process_group(); import torch; print(torch.distributed.get_rank())"
Remember to manually finalize the backend!
torch.distributed.destroy_process_group()
NVSHMEM
Nvshmem usage is very similar to the pytorch usage, one needs to use a thin wrapper around the native nvshmem init.
Example:
import rixa
from cuda.core import Device
store = rixa.PMIxStore(30) #manualy specify the PMIx backend with manual timeout, can become handy to set the device
dev = Device(0) #first device or just set based on the use case
rixa.nvshmem.init(dev, store) #device, store
Remember to manually finalize the backend!
nvshmem.finalize()
Roadmap
- Support for NVSHMEM (pytorch, cupy)
- Support for JAX
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 Distribution
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 rixa-0.0.3.tar.gz.
File metadata
- Download URL: rixa-0.0.3.tar.gz
- Upload date:
- Size: 46.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cacf6826e68842a0ee564d53317cc00c6b25f8b42af7f7bb4055984541a153fd
|
|
| MD5 |
ed016e0c2cee7c52ab67e1d5e173cee8
|
|
| BLAKE2b-256 |
7926e795b280377a4286893ac186f5000cb7c966c78c8f749fe7f983ccc2f0e6
|
File details
Details for the file rixa-0.0.3-cp310-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: rixa-0.0.3-cp310-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.7 MB
- Tags: CPython 3.10+, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c61e3b47c7421b2325d4ed359a1a42622401b607e1541eccf3afc0cf3bf6c0d
|
|
| MD5 |
95090d32bccd5250626ed9d4171c8ee4
|
|
| BLAKE2b-256 |
2dffacbde4bb4b1f819f3bb7e4d4769d8fced1d6b2e589dfa7b85e6c06aa74e7
|
File details
Details for the file rixa-0.0.3-cp310-abi3-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: rixa-0.0.3-cp310-abi3-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 2.6 MB
- Tags: CPython 3.10+, manylinux: glibc 2.24+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c661ccf6286ee6f17a486495ba6f679c75b2da7fc970ec2ca7af3c65654ef872
|
|
| MD5 |
e7c19f35c00ff24c5e1ecd660764b628
|
|
| BLAKE2b-256 |
84fb4c285cdc34674facfe67ec70ec2b61286b5e3a9384adf00a63a39c7a9040
|