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 class
PerShard
PerShard
class max.experimental.sharding.PerShard(values)
Bases: object
A distinct value per mesh shard.
Wraps a sequence of per-shard values so the dispatcher can index
into it by mesh shard when forwarding a non-tensor argument to a
per-shard op call. Non-PerShard values appearing in
ActionSet.extras are treated as uniform across shards.