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.2.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.2-cp314-cp314-musllinux_1_2_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

rixa-0.0.2-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.2-cp313-cp313-musllinux_1_2_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

rixa-0.0.2-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.2-cp312-cp312-musllinux_1_2_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

rixa-0.0.2-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.2-cp311-cp311-musllinux_1_2_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

rixa-0.0.2-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.2-cp310-cp310-musllinux_1_2_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

rixa-0.0.2-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.2.tar.gz.

File metadata

  • Download URL: rixa-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 6c62dace8b61ac0e5432305d153114db9b427e5881b0b3fb1835ed0655c89c94
MD5 690224d47aff79d219dd070c2e95e7d7
BLAKE2b-256 56a82d77a45870bc32a01cebdde6b406e4c78648ebf86c2a23b4b44f154a5630

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rixa-0.0.2-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f1289b1b87136b0634a62d1a5f2cc4166feeb06f57851d346158e7424bbe78d6
MD5 c9fe3b788d9e3f079349fbd77a829feb
BLAKE2b-256 db6715743b43ae60c4e2f246b8b44b70dfe9ebd4282854be7c92573112412d65

See more details on using hashes here.

File details

Details for the file rixa-0.0.2-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.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dfb75f9f4bcac2115ef88c10361396eea85d13efc6b5abc3ebcdaced1e850ca7
MD5 aef904bdf51e6e6fefc14cdbfa687ac8
BLAKE2b-256 b89791d773f25b92391e4e65559234736d34246a2ba260c188b37e9a4b4157f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rixa-0.0.2-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d1ca7cdc99536cd24b9798775d3c5702577ca65898af35d60c7757dbfb2a7b11
MD5 eba0c03b54d1d979ae519d31da3a9b65
BLAKE2b-256 c328955ec152b4904be11aedcadca651fe9a96b055fe1509a671e6fd45f1aa22

See more details on using hashes here.

File details

Details for the file rixa-0.0.2-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.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 da5193e0b7dd7dc5ae1f5f059cec9aff45bce20455fb198f0e9a5b05af11bf79
MD5 bcfa7014721db17ddd73c30277c8f5ae
BLAKE2b-256 451918500b2ac7d70b2f53f19a37abbc88c064f1fe56724323c8e64c2ece2c06

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rixa-0.0.2-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ae5b95b13e053e96f41e9c09e249979c2cab4ecb281293dc3a84fcbd0b699faa
MD5 89283bc0005498ca1098fa4d22ba18b1
BLAKE2b-256 d4d229194ca19ef297f8da31c5aac6805820f5abe93f371679ef8517c1082979

See more details on using hashes here.

File details

Details for the file rixa-0.0.2-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.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 26cc7a2cfe0d7abca0b825fe1876cb34c74adcb2108e2c310d43bc4e81458246
MD5 0bb2a2d63cbbee64f4953192bf6b785c
BLAKE2b-256 8b38da6b5115d280f5dc33e4b6eee27fe6906f4a1c7340eb2e66e00d93d6f408

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rixa-0.0.2-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 37806cebd2829c57f978ce563bbf08bee020545ded61e04d93348f6e8c104179
MD5 40148bc596090c551c568d2292607976
BLAKE2b-256 44233ea8dbb611215846abd20199fa294771f3b52d3fc50f080f5e8c5a4cdf04

See more details on using hashes here.

File details

Details for the file rixa-0.0.2-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.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 34101983cae88545f6100da41ab40bebd6207a26e2c8285aec99090b5e3c0e1b
MD5 704dd199b0e7b00cc361a582ac8c9dcc
BLAKE2b-256 a81252e03e2bfce24f8130d8864389165dd1cfb03621e11a4a1b8f889ed3b1db

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rixa-0.0.2-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 cb1b580c05079b1836c922f3c570832b0268d510390d7f1dae0ab6c688ca9b80
MD5 9ed3b956b6fa9d19f181351361a030c9
BLAKE2b-256 c88743c5c5bf1b0b8f246661c6b90ffedcc1d588ebb0f65cebf62d090e5da074

See more details on using hashes here.

File details

Details for the file rixa-0.0.2-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.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7c0816e03dda8d49f2d1d9e2b102c1b5fe879cf56abfcf6f8c95167a2fc809fd
MD5 3363bdc47a3ced547f291d0ab71418d3
BLAKE2b-256 412b3ff48fdd18ea3c78ce290385b263df6e471d080903cafb30a61376bc189d

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