Skip to main content

PMIx bootstrap method for modern AI/ML applications

Project description

Rixa

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.

Instalation

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 (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()

Usage (NVSHMEM)

Nvshmem usage is very simillar 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()

Development

Library can be compiled from source with standard setuptools and requires PMIx library supporting version >5.0. Development of the package is managed with pixi that can be used to also bring all necessary libraries for testing and development. It can be locally tested using prrte and more recently with OpenMPI provided by pixi. To build and test the library one can use commands provided in pixi.toml.

pixi run build  #downloads everything and builds
pixi run test   #launches pytest and uses openmpi>5.0 to launch the test
pixi run ci     #does both at the same time

Alternatively, one can use pixi build to compile a conda package.

Roadmap

  • Support for NVSHMEM (pytorch, cupy)
  • Support for JAX

PMIx

One of the most common ways to bootstrap massive distributed programs is to use Process Management Interface (exascale), PMIx for short. It was designed to launch massive MPI jobs accross enourmous HPC clusters, some achieving exascale performance. It is integrated with the SLURM job scheduler and can selected to be a default launching mechanism. Moreover, the 5th version it is ABI compatible. Hence, it avoids various problems related to the MPI-based programs (for example, mpi4py needs to be compiled against specific MPI version). This makes this particular approach promising to achieve a platform-independent launching mechanism for PyTorch distributed jobs on modern HPC clusters.

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.2rc1.tar.gz (46.2 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.2rc1-cp314-cp314-musllinux_1_2_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

rixa-0.0.2rc1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

rixa-0.0.2rc1-cp313-cp313-musllinux_1_2_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

rixa-0.0.2rc1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

rixa-0.0.2rc1-cp312-cp312-musllinux_1_2_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

rixa-0.0.2rc1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

rixa-0.0.2rc1-cp311-cp311-musllinux_1_2_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

rixa-0.0.2rc1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

rixa-0.0.2rc1-cp310-cp310-musllinux_1_2_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

rixa-0.0.2rc1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.6 MB view details)

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

File details

Details for the file rixa-0.0.2rc1.tar.gz.

File metadata

  • Download URL: rixa-0.0.2rc1.tar.gz
  • Upload date:
  • Size: 46.2 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.2rc1.tar.gz
Algorithm Hash digest
SHA256 90dd60bf0129700bd1c150cd571db457dbea50a5e27831008240825603397b94
MD5 ff694403888b4c72513bcdf660ace402
BLAKE2b-256 0679c745c3a8a389452ace75bcda977b81267aa75ca7cc3d0427bb9e30e4d92b

See more details on using hashes here.

File details

Details for the file rixa-0.0.2rc1-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rixa-0.0.2rc1-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2b47790095c99449bfa81a742b9ac1fd4b3a730d68b09a78bd552c2217148b68
MD5 33a47b7ba5da44782c55db5319414782
BLAKE2b-256 08ee5c12b81b9d613742aec230352eadfc81e83e32e7900028d0a3e7e4543a02

See more details on using hashes here.

File details

Details for the file rixa-0.0.2rc1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for rixa-0.0.2rc1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 aa82b04548ac71227d83572af46cc2bc0c13195b3a7d7779fd22416b56ea8de3
MD5 22410216657c0c37a494ab19bfd03473
BLAKE2b-256 bf8c647ccd83a589ebb4948d53d8ab815f2a65652a63bc64b076d85b8a12d8b2

See more details on using hashes here.

File details

Details for the file rixa-0.0.2rc1-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rixa-0.0.2rc1-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c4416bca2ada1e4d5277c8d162920c9b916521b3dcf9fb335d4a230a3924560a
MD5 de2223f6d42fa5cac2cc273fd51e3084
BLAKE2b-256 7c7eff52e75714a7152964252c7ed896d106bb9ceee5a02f5e133e02ad5a9da9

See more details on using hashes here.

File details

Details for the file rixa-0.0.2rc1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for rixa-0.0.2rc1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bcda84745203711b4851cbfd02c3c301a264568025f72551589245d1e0cd6e52
MD5 a1aab24574a91ec9f75de074a1c446b3
BLAKE2b-256 3f1355d334a84c634082c84e092d4f840d0de157249bcab3c56e3f935a43fa36

See more details on using hashes here.

File details

Details for the file rixa-0.0.2rc1-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rixa-0.0.2rc1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 916e360596978f8ff44d2082505e874bcba751f4175f871fd5c902c72e369e7e
MD5 db351f053372795ee71291110c439a6d
BLAKE2b-256 a5e7602510d9a13e15fba39f205bb53e6908fdca5f122cc767661a771956606a

See more details on using hashes here.

File details

Details for the file rixa-0.0.2rc1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for rixa-0.0.2rc1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 22c28679a2c6ff045a254194d9e293738efd0485bbc7a81d6ecd2bba89129cf0
MD5 cdf71c33649ae247d1800b9e11cd2614
BLAKE2b-256 7fb6d01e32f27506a75f3398bca2d8be6c15b48a44a46e359b12d909f05fbbdf

See more details on using hashes here.

File details

Details for the file rixa-0.0.2rc1-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rixa-0.0.2rc1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 321cd887cb93153d79179b5acbceea2c600dbf7309cee935c289396a1b95841a
MD5 8aa3089f2832e3b3267c0931889d9591
BLAKE2b-256 1888253738569ec4b82b4cc100ca568f5af2aef93ca42ffcac504f5a50f3b542

See more details on using hashes here.

File details

Details for the file rixa-0.0.2rc1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for rixa-0.0.2rc1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 706f1d8fc2d31b924bfd235a21b01ff0d4205d304388151ae2f97963d92b1de3
MD5 439604baaf86139c41067fd32a24c8cf
BLAKE2b-256 37420d90f63d8f58ec62bf74aaa48d0bd840b52cc41637f383a654a98d625264

See more details on using hashes here.

File details

Details for the file rixa-0.0.2rc1-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rixa-0.0.2rc1-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 da8dac8b6a4eb898dbcfcd93007fb4ba33727371035fa59d4837a2e912070455
MD5 c3dea5ee3bb99ed56ad6ad9820e57e12
BLAKE2b-256 a53490b41ba49d8246ae5a3b2f331225133ec96f66f75afd279952f71a7a8cc2

See more details on using hashes here.

File details

Details for the file rixa-0.0.2rc1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for rixa-0.0.2rc1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 169b0d880eff29fbd330f81ba93c59d462dbc12af50fb8cacc16c0042fdee4f8
MD5 c9666b090db008278b222533c6a37568
BLAKE2b-256 da4ad6fbd63e0dc53a419a2f12b647d601deac510e984ba764652f72cb9da521

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