IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Python class

Action

Action

class max.experimental.sharding.Action(inputs, outputs)

source

Bases: object

A rule’s picked decision for one op call.

inputs has one entry per op argument in positional order: DeviceMapping at tensor positions; bare scalar (treated as uniform across ranks) or PerShard at non-tensor positions. outputs has one DeviceMapping per op output. The dispatcher inserts transfer_to collectives to match inputs before per-shard dispatch; outputs is the post-op mapping each result wears.

Parameters:

inputs

inputs: tuple[Any, ...]

source

outputs

outputs: tuple[DeviceMapping, ...]

source