For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Python module
max.experimental.sharding.per_shard_dim
Per-shard Dim wrapper carrying one value per device.
A PerShardDim bundles one Dim per mesh shard
(device index along a Sharded mesh axis). Arithmetic distributes
element-wise. make_per_shard_dim() collapses to a plain Dim
when every cell is equal. Wrappers must never reach MLIR; they are projected
per shard by shape rules before any Dim.to_mlir() call.
Per-shard dimensions
PerShardDim | A Dim whose per_shard tuple lists one cell per mesh shard. |
|---|
global_dim | Folds a PerShardDim into a single global Dim. |
|---|---|
global_shape | Returns the global shape by summing every PerShardDim axis. |
is_per_shard_dim | True if d is a PerShardDim. |
is_static | True if d's global extent is a static (compile-time) size. |
is_symbolic | True if d's global extent is a symbolic (named) dim. |
local_dim_at | Returns the dimension value at shard. |
local_shape_at | Projects every axis of shape onto a single shard index. |
make_per_shard_dim | Wraps per_shard in a PerShardDim, or collapses to a plain Dim. |