Skip to main content

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

  1. Zero-config Launching: No master IP/Port orchestration required.

  2. HPC Native: Leverages existing Slurm, Flux, or OpenMPI environments.

  3. 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


Download files

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

Source Distribution

rixa-0.0.3rc3.tar.gz (46.5 kB view details)

Uploaded Source

Built Distributions

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

rixa-0.0.3rc3-cp310-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

rixa-0.0.3rc3-cp310-abi3-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (2.6 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

File details

Details for the file rixa-0.0.3rc3.tar.gz.

File metadata

  • Download URL: rixa-0.0.3rc3.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

Hashes for rixa-0.0.3rc3.tar.gz
Algorithm Hash digest
SHA256 7e03428208f5df8af5cdf9f83905fc1dede9e0fb02eff925daaed1da8e25c7d2
MD5 308e70087c439a8405aa2aba7e933ce3
BLAKE2b-256 482a7eee4dc6cbc0ac77dc4b289fa57b6f209b9220f66617810ac7e8452d7d1e

See more details on using hashes here.

File details

Details for the file rixa-0.0.3rc3-cp310-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for rixa-0.0.3rc3-cp310-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 814047dfa3ce78961bb511677709b73bd55ec2cbb90567c51fedeb96394a3ba0
MD5 55a0bfeea6060c3ded197da43768c7d9
BLAKE2b-256 dd10064dc0b6206e0dbeb22dd234964e0f884707cdd39e0e5c8e6d78dc53a055

See more details on using hashes here.

File details

Details for the file rixa-0.0.3rc3-cp310-abi3-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for rixa-0.0.3rc3-cp310-abi3-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8acda2c65f42d8adeadf3e602953ffef181f629f9a593d9fc8023a8f2165f2ca
MD5 2e7df6cdef90ecec6009531e6d852695
BLAKE2b-256 a0efc8eb85e4bbcdd184591de0cc4a26d647dad07a8722ace187e56da516d3df

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page