0
Fork 0
mirror of https://github.com/zml/zml.git synced 2026-11-16 19:11:09 +00:00
zml/pjrt
Guillaume Wenzek 2251b1d815
zml: sharding (#26)
First rough support for in-process sharding.
The goal of sharding is to allow leveraging several GPUs to collaborate
to run one big model.

Current implementation:
* added `platform.sharding()` describing how the set of devices managed
by the current process should be used.
* added a `_sharding_info` to shape.
* A tensor / shape axis can be marked as needing sharding using
`.withSharding(.{ .a })` or `.withSharding(.{ 1 })`.
* When using `populateModelWeights` tensors with sharded axes, will be
populated by sharded buffers.
* when generating the MLIR bytecode for a ZML function the **input**
arguments, will see their `_sharding_info` converted into
`mhlo.sharding` attributes
History 2024-10-01 21:12:25 +02:00
..
BUILD.bazel zml: initial release 2024-09-17 11:11:18 +02:00
dlfcn.h zml: initial release 2024-09-17 11:11:18 +02:00
pjrt.zig zml: sharding (#26) 2024-10-01 21:12:25 +02:00
profiler.zig zml: remove dead code (#27) 2024-09-26 11:03:41 +02:00