Shardy
MLIR-based partitioning system
Shardy is an MLIR-based tensor partitioning system for all dialects. Built from the collaboration of both the [GSPMD](https://arxiv.org/abs/2105.04663) and [PartIR](https://arxiv.org/abs/2401.11202) teams, it incorporates the best of both systems, and the shared experience of both teams and users. The project is written primarily in MLIR, distributed under the Apache License 2.0 license, first published in 2024.
Shardy
Shardy is an MLIR-based tensor partitioning system for all dialects. Built from
the collaboration of both the GSPMD and
PartIR teams, it incorporates the best of
both systems, and the shared experience of both teams and users.
Shardy is meant to be dialect agnostic and provide extensive user control and
debuggability features. It includes an axis-based sharding representation, a set
of compiler APIs, functionality for sharding propagation, and plans for an SPMD
partitioner.
Documentation
Official Documentation: https://openxla.org/shardy
For more information see the docs directory.
Status
Shardy is a work in progress. Currently the core dialect and C bindings are
fully functional. The Python bindings are under development.
Contacts
Currently we are not accepting contributions directly to the GitHub repository.
If you still wish to contribute, please contact the maintainers - maintainers at
openxla.org
Build instructions
Here's how to build the Shardy repo on Linux or macOS:
-
Bazel is our primary build tool, so before you begin make sure that you have
it installed.sh# On Linux sudo apt install bazel # On macOS brew install bazel -
Clone the Shardy repo:
shgit clone https://github.com/openxla/shardy cd shardy -
Update the
bazel lockfile, if
necessary:shbazel mod deps --lockfile_mode=update -
Build Shardy:
shbazel build -c opt --lockfile_mode=error shardy/... -
Now you can make sure it works by running some tests:
shbazel test -c opt --test_output=errors shardy/...
Using Shardy with JAX
If you'd like to build JAX with a modified version of Shardy, you can find
instructions at
https://jax.readthedocs.io/en/latest/developer.html#building-jaxlib-from-source-with-a-modified-xla-repository.
Contributors
Showing top 12 contributors by commit count.