[inductor] Fuse interleaved epilogues in nested reductions (#190595)
Human context: We had previous nested reductions, as well as nvfp4 sub-iteration domain fusing. this combines the two. Extend fused nested reductions with a sub-parent domain for interleaved pair consumers. This keeps RMSNorm plus NVFP4/MXFP4 packing in one kernel while validating source layouts, non-leaf consumers, and ordinary scheduler fusion gates. Represent the sub-parent domain in grouped coordinates `(outer, groups, local/factor)`, matching the derived codegen family. This intentionally rejects reshapes that cross grouped-axis boundaries even when their flattened numel matches. Only nested reduced outputs are marked for forced broadcast materialization; the standalone path continues to rely on planned sources and removed-buffer handling. Test Plan: ``` python test/inductor/test_inductor_scheduler.py -k nested_reduction_sub_parent_domain -v TORCHINDUCTOR_FORCE_DISABLE_CACHES=1 python test/inductor/test_nested_reduction.py -k sub_parent ``` Authored with assistance from Codex. Pull Request resolved: https://github.com/pytorch/pytorch/pull/190595 Approved by: https://github.com/drisspg
E
eellison committed
622b0e329d68c3b87d4da922106c7a0ff6500633
Parent: 52d08b9
Committed by PyTorch MergeBot <pytorchmergebot@users.noreply.github.com>
on 8/25/2026, 1:21:36 AM