Skip to content

[mpmd] Bypass max_clones limit for trivial ops in mesh inference.#1360

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_917977407
May 21, 2026
Merged

[mpmd] Bypass max_clones limit for trivial ops in mesh inference.#1360
copybara-service[bot] merged 1 commit into
mainfrom
test_917977407

Conversation

@copybara-service
Copy link
Copy Markdown

@copybara-service copybara-service Bot commented May 20, 2026

[mpmd] Bypass max_clones limit for trivial ops in mesh inference.

When a meshless op has more fragment users than max_clones, and has operands, it gets wrapped in a new fragment per mesh instead of being cloned into each consumer fragment. For trivial ops (<=1 operand, 1 result, 0 regions, pure) like sdy.sharding_constraint, this wrapping creates millions of tiny fragments that are expensive to merge later.

This change bypasses the max_clones limit for trivial ops since they
are always cheap to clone.

@copybara-service copybara-service Bot changed the title Bypass max_clones limit for trivial ops in mesh inference. [mpmd] Bypass max_clones limit for trivial ops in mesh inference. May 20, 2026
@copybara-service copybara-service Bot force-pushed the test_917977407 branch 2 times, most recently from 21ded3c to 7b61f51 Compare May 21, 2026 09:57
When a meshless op has more fragment users than max_clones, and has operands, it gets wrapped in a new fragment per mesh instead of being cloned into each consumer fragment. For trivial ops (<=1 operand, 1 result, 0 regions, pure) like sdy.sharding_constraint, this wrapping creates millions of tiny fragments that are expensive to merge later.

This change bypasses the max_clones limit for trivial ops since they
are always cheap to clone.

PiperOrigin-RevId: 918944215
@copybara-service copybara-service Bot merged commit b38eded into main May 21, 2026
@copybara-service copybara-service Bot deleted the test_917977407 branch May 21, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant