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

PartialsOnly

PartialsOnly

class max.experimental.sharding.PartialsOnly

source

Bases: object

Cost-model-free picker that only resolves Partial → Replicated.

Picks a feasible action under these rules, applied in order:

  1. The first action whose input mappings already match the layouts exactly (no reshard).
  2. The first action whose only per-axis input differences are Partial → Replicated transitions (allreduce-only).
  3. Otherwise: raises ShardingError.

Never computes a transition cost; never permits S↔R, S(d)↔S(d’), or R→S reshards on inputs. Useful when you’ve already pinned the placement of every tensor and just want the picker to allreduce Partials when an op can’t consume them directly. No on_reshard diagnostic — this picker raises directly when it can’t satisfy the P→R-only contract.