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 function
make_per_shard_dim
make_per_shard_dim()
max.experimental.sharding.per_shard_dim.make_per_shard_dim(per_shard, *, global_dim=None, force_wrap=False)
Wraps per_shard in a PerShardDim, or collapses to a plain Dim.
Collapses to per_shard[0] when every entry is equal and no
global_dim is attached. Pass force_wrap=True to keep the
wrapper even when entries happen to be equal (used on Sharded axes so
global_dim() recovers the global extent), or pass global_dim
to record the axis’s global size for int()/display.