The single-dim strategy path inserts an implicit all-Replicate rule. SDPA efficient attention intentionally uses None output specs for philox_seed and philox_offset so those scalar tensor outputs remain local tensors, matching the previous op-strategy behavior. The inserted rule used Replicate for those outputs because meta propagation returns real scalar TensorMeta, so combining it with explicit SDPA rules on a 2D mesh could build a DTensorSpec with placements=(Replicate(), None).
This addresses a regression from #186667, which migrated matrix ops to single-dim strategies and introduced the mixed per-mesh-dim behavior for these outputs.
Preserve output positions that are None in every explicit single-dim strategy when inserting the implicit replicate rule. Also make full-mesh expansion reject mixed None/Placement entries instead of constructing invalid DTensorSpec objects.
Test Plan: Added regression tests for SDPA efficient-attention philox scalar outputs and mixed None/Placement output rejection. Ran the affected tests and lintrunner.
Authored with the assistance of an AI coding assistant.
Pull Request resolved: #187199
Approved by: https://github.com/pianpwk
SOCIAL SHARE CARD GENERATOR