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 function
build_action_set
build_action_set()β
max.experimental.sharding.build_action_set(rows, *, layouts, extras=(), result_shape=None, finalize=None, finalize_ctx=None)
Wraps rule-emitted rows into a feasibility-filtered ActionSet.
Filters rows to entries feasible on at least one mesh axis and
appends the universal (R,...,R) -> R fallback if absent.
-
Parameters:
-
- rows (Iterable[AxisAssignment]) β Per-axis decisions the rule wants on the menu. Order is preserved as the cost-model tie-breaker.
- layouts (tuple[TensorLayout, ...]) β Tensor input layouts, one per tensor positional arg.
- extras (tuple[Any, ...]) β Non-tensor positional args forwarded to the picked
Action. - result_shape (Sequence[Dim] | None) β Output shape constraint for reshape-style rules.
- finalize (Callable[[Action, Any], Action] | None) β Optional post-pick transform of shape
(action, ctx) -> action. - finalize_ctx (Any) β Opaque per-op context forwarded to
finalize.
-
Return type:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!