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

Installation

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.1.tar.gz (10.7 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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: rixa-0.0.1.tar.gz
  • Upload date:
  • Size: 10.7 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.1.tar.gz
Algorithm Hash digest
SHA256 412a6dbe6a917b8210ab4b2b9215772152d30d7e7bbfdbaaeb30af5e00a01224
MD5 6ebb53cb815d59cd3cfd2c3c8c567bd2
BLAKE2b-256 28207cd9999563cda4326ecb3d928d4d1ce80f68ab719f3a11668fa4ca3c7ddb

See more details on using hashes here.

File details

Details for the file rixa-0.0.1-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rixa-0.0.1-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b4ffe240df8b1cd5d94410d0b148851b15ea737e618079d68e7f3cbd21d14c79
MD5 11e59d78000163732ce0143f5c7c80ed
BLAKE2b-256 7481ef4ebbb25a46d29c8f115f4b21c5b2106b9de9b7febf962ce9f5b45e5104

See more details on using hashes here.

File details

Details for the file rixa-0.0.1-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.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0e1193e9998fd553976223e0f58caf3ec0c269f51e4d64b886ce3843b5556625
MD5 c1309c696ba6ebbb18cbc2007fec856f
BLAKE2b-256 4e24f4d5bd5ba3186ce19113dbec83b6d5fa9de0870b1ef648200b9de87a7fbc

See more details on using hashes here.

File details

Details for the file rixa-0.0.1-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rixa-0.0.1-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d8c1fdec885f7341cb866353dec576d090a0d6dd8802cc05937b2d1a96fc8464
MD5 40e1442a9e4f3675c0481b34e9b50f1a
BLAKE2b-256 875f57b75ae773bfeb22c7e29c9874c816581059a0791a1ce5f774d4f55afc89

See more details on using hashes here.

File details

Details for the file rixa-0.0.1-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.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f35f8379d0a0a678453350f63e809408c191bda5865e3d0891b6e8852222c356
MD5 1bbece87e600590c59b7d657e0fc1d4b
BLAKE2b-256 956ff7e234ecd8282421b85d46a4c316ee6c573ed7ba64fbc2f64cc5e5cfe6be

See more details on using hashes here.

File details

Details for the file rixa-0.0.1-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rixa-0.0.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 243f27cd31c1554ee04aceb73aa03d255e240b7767e5a861f9fc74ccab27166c
MD5 cf1e6bd07defc21d566af6260ae50e29
BLAKE2b-256 8d3c0f80f3d55eb2d10853bd3c33caa08be37ed79fe53b9398196a213a4d0a62

See more details on using hashes here.

File details

Details for the file rixa-0.0.1-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.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1510c84fd269b2dfec6935130bc1356a7895881497b5ba8c89b3e4e094d97d86
MD5 fbafd29955385f1337f69efb397d0f6c
BLAKE2b-256 e3cc2f22a47c78989a4730daf55e9baae11c85dc246c57121cb456b5117e35eb

See more details on using hashes here.

File details

Details for the file rixa-0.0.1-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rixa-0.0.1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a5d85b8d48ef6438fc97d1d03da0b218cdc00a4c337a75b862f1317ab9d56b5f
MD5 ac8feb9b1bac15bb1fd8eb712ff18fc5
BLAKE2b-256 a32c93c50c505403def914e595666f6244468878e8b0bd967809241f8802a2d2

See more details on using hashes here.

File details

Details for the file rixa-0.0.1-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.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ec1ba7f019934aeaa4b99cf341202c04a6f87a889df0d56ad48b7aba79b246ce
MD5 3aa35de0554096795fad7fa333ab6b9f
BLAKE2b-256 62f49162098908c57d892c7b3b12aa79ac4c4f411e83a5985fbfc12830bbbab0

See more details on using hashes here.

File details

Details for the file rixa-0.0.1-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rixa-0.0.1-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 062cdcb9f100109efe86833621bb5fae72fd861cf9624704c6a8058fba33d8d7
MD5 91170419c22765d62fc43e41b9b606c9
BLAKE2b-256 69b5dde07b5ace22c2a1ec91c69e5e1c2045a09ddc8c1952c890ebc2d434f8fb

See more details on using hashes here.

File details

Details for the file rixa-0.0.1-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.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 df57889526eac48fc7001fdc8aedfeb488e5beb171e32401f48d903dcee3f1ae
MD5 45f8ef2ac05d1029831011eaea905f73
BLAKE2b-256 550666d0aebda9fc7724e24db8e33a5ab9ef8debedc5ed05c96f8cba2183030c

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