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.2rc2.tar.gz (46.1 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.2rc2-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.2rc2-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.2rc2-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.2rc2-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.2rc2-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.2rc2-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.2rc2-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.2rc2-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.2rc2-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.2rc2-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.2rc2.tar.gz.

File metadata

  • Download URL: rixa-0.0.2rc2.tar.gz
  • Upload date:
  • Size: 46.1 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.2rc2.tar.gz
Algorithm Hash digest
SHA256 7e7ab448751d5bf7210680dc6d942c3dab274c5594430cae4318f0e7f0a49179
MD5 3f787dbc0afb75400bf18350c648062b
BLAKE2b-256 7d6727791bcc78bce1c165b1f9b1582527e189d48af69a40a2860a37079bd6ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rixa-0.0.2rc2-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7adb21545bf4d501b9b378d5d343c80b7cd7abdee51c8bd1b24b86a40da3a37d
MD5 42761ea2b70b3402bc6e9fa3cca7031d
BLAKE2b-256 07200231b685a7e98939f90fec4fc4cefbf51bce2ade1be80ee622c213f4173a

See more details on using hashes here.

File details

Details for the file rixa-0.0.2rc2-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.2rc2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 995fb55fd5399a813d406a5008a6935c8f5622361dbf7187ab3f528cef0cdd55
MD5 d55aa6332dfdcb2fcf182e85a850be5c
BLAKE2b-256 ba568724c7ad4b357439bbc96ad961b460efa61fec8e5787a3463f1aefe46365

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rixa-0.0.2rc2-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c326c6466bec64b55945d2c070ade7f60bdbd15eab17dca9f4e25c60b674f63d
MD5 bdecb2bfeb37919f9291801481210587
BLAKE2b-256 7647c8cb7991f4954f8db1c38987ee7456cf2042e3765859275f118632f51daa

See more details on using hashes here.

File details

Details for the file rixa-0.0.2rc2-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.2rc2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4cf58eefdfb2867de79f0fafdb3d00daccb601008d8bb532e7c6883aa7e7c312
MD5 2aac814930f9e7a362901a3c1c9bf293
BLAKE2b-256 38435b652e5e184335cd8706ab33911480eff179b41b709ac449f1668ba6a7b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rixa-0.0.2rc2-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 6d2a1f17c20ad4e976c4f5a847dad46de8bd4e1667c4135966fb46e9ba7b51cc
MD5 272a43b10fc884e22706b48b519bcce2
BLAKE2b-256 8c972d878d47b7f12974b7ba3659c1545b7e71b02c6c8451cee9adcd471ce8ad

See more details on using hashes here.

File details

Details for the file rixa-0.0.2rc2-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.2rc2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1d191d7731e2cec842a84191db86b6d609519b079b4eeefdfeced0c3615fe6f3
MD5 f7d9a4a4be6cb4ca0d2356ade4c23d3f
BLAKE2b-256 d79406815d3c2a0259996856a6f0b2317207ffc03d23462ead8778d7fd613d03

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rixa-0.0.2rc2-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e7b2175fc7098502db3036eff9bea8321d29dfe1f592b3b18b08e23260c7969f
MD5 930ef4db0e3f179873cb309b4e731202
BLAKE2b-256 6cb80a23d38f7ef098c5f58dc173f7de08d25f092c0567abebf522d2e7d333e5

See more details on using hashes here.

File details

Details for the file rixa-0.0.2rc2-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.2rc2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dbb62b68508f9dcf49e4b9cdbef94c5a4fdb4b360d7fbdfd120bda417d9172e9
MD5 3662f99d432878e6b4b316eee25a5b97
BLAKE2b-256 e4930a035b01898999f0f3ff0af002aac2e1ead786e1094a4426b9bf5702753e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rixa-0.0.2rc2-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 22a8badc52f9108d26ecd26137bdaf2e54beccf90c9ea2fe732d6c9ce2f5e1f6
MD5 c828bdc4b0da03ee75d26e9664a0466b
BLAKE2b-256 bc9192bb3adaa4b2a3f7f268b5301a81620bcb24133f142ce2c3fc5ad774f610

See more details on using hashes here.

File details

Details for the file rixa-0.0.2rc2-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.2rc2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c817ba3d9f9c695b523a75b5413d5bed4bc068b8473f0a5a19b4a9f523a7d4f2
MD5 25f5c26ec15b9c037b8d0df007187e67
BLAKE2b-256 616990454bc1dd2e191806fab531bd5413a59b4419ce06dd1296370e5c1ca2c1

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