Skip to content

[inductor] Support atomic template reduction groups - #190822

Open
mlazos wants to merge 37 commits into
gh/mlazos/274/basefrom
gh/mlazos/274/head
Open

[inductor] Support atomic template reduction groups#190822
mlazos wants to merge 37 commits into
gh/mlazos/274/basefrom
gh/mlazos/274/head

Conversation

@mlazos

@mlazos mlazos commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Allow template scheduling to claim a complete reduction chain as one atomic fusion unit and retain the template output identity needed by multi-output kernels. Prevent partial fusion from consuming layout or finalizer nodes before NVGEMM can validate the complete grouped pattern.

Reject horizontal fusion involving NVGEMM boolean outputs and prioritize valid NVGEMM reduction chains ahead of ordinary Triton fusion candidates.

Test Plan:

lintrunner -a

Authored with an AI assistant.

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/190822

Note: Links to docs will display an error until the docs builds have been completed.

❌ 9 New Failures, 4 Cancelled Jobs

As of commit 8c17d64 with merge base e56e791 (image):

NEW FAILURES - The following jobs have failed:

CANCELLED JOBS - The following jobs were cancelled. Please retry:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

This was referenced Jul 22, 2026
@mlazos

mlazos commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

AI-Review

Automated multi-agent review (2 Claude + 2 Codex + synthesis). This is AI-generated — please verify findings manually.


Verified Issues

  • [medium] Fusion can commit without a tile-compatible EFC choice — Location: can_fuse_reduction_epilogue(), codegen_template(), _best_nvgemm_choice(). Trigger: an axis-1 grouped reduction whose group exceeds every available EFC tile-N. Failure sequence: fusion returns True; codegen filters out every choice using min_tile_n; _best_nvgemm_choice() raises RuntimeError. Impact: compilation aborts instead of falling back. Reviewers: Claude Design, Codex Design, Codex Bug.

  • [low] New test accesses a nonexistent property — Location: test_epilogue_program_owns_only_named_feed_intermediates. Trigger: run the test. Failure sequence: it evaluates program.pointwise_nodes, but NVGemmEpilogueProgram only defines evt_nodes; attribute lookup raises AttributeError. Impact: deterministic test failure. Reviewers: none; found during verification.

[ghstack-poisoned]
mlazos added a commit that referenced this pull request Jul 23, 2026
Allow template scheduling to claim a complete reduction chain as one fusion
unit and retain the output identity needed by multi-output template kernels.
This prevents partial fusion from consuming layout or finalizer nodes before
NVGEMM can validate the complete grouped pattern.

Test Plan:

```bash
lintrunner -a
```

Authored with an AI assistant.


ghstack-source-id: 1b35327
Pull-Request: #190822
mlazos added a commit that referenced this pull request Jul 30, 2026
> Allow template scheduling to claim a complete reduction chain as one atomic fusion unit and retain the template output identity needed by multi-output kernels. Prevent partial fusion from consuming layout or finalizer nodes before NVGEMM can validate the complete grouped pattern.
>
> Reject horizontal fusion involving NVGEMM boolean outputs and prioritize valid NVGEMM reduction chains ahead of ordinary Triton fusion candidates.
>
> Test Plan:
>
> ```bash
> lintrunner -a
> ```
>
> Authored with an AI assistant.

ghstack-source-id: 4893312
Pull-Request: #190822
[ghstack-poisoned]
mlazos added a commit that referenced this pull request Jul 30, 2026
> Allow template scheduling to claim a complete reduction chain as one atomic fusion unit and retain the template output identity needed by multi-output kernels. Prevent partial fusion from consuming layout or finalizer nodes before NVGEMM can validate the complete grouped pattern.
>
> Reject horizontal fusion involving NVGEMM boolean outputs and prioritize valid NVGEMM reduction chains ahead of ordinary Triton fusion candidates.
>
> Test Plan:
>
> ```bash
> lintrunner -a
> ```
>
> Authored with an AI assistant.

ghstack-source-id: ea479e6
Pull-Request: #190822
mlazos added 2 commits July 29, 2026 22:42
[ghstack-poisoned]
[ghstack-poisoned]
mlazos added a commit that referenced this pull request Jul 30, 2026
> Allow template scheduling to claim a complete reduction chain as one atomic fusion unit and retain the template output identity needed by multi-output kernels. Prevent partial fusion from consuming layout or finalizer nodes before NVGEMM can validate the complete grouped pattern.
>
> Reject horizontal fusion involving NVGEMM boolean outputs and prioritize valid NVGEMM reduction chains ahead of ordinary Triton fusion candidates.
>
> Test Plan:
>
> ```bash
> lintrunner -a
> ```
>
> Authored with an AI assistant.

ghstack-source-id: f127fe7
Pull-Request: #190822
[ghstack-poisoned]
mlazos added 5 commits July 31, 2026 00:25
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
mlazos added a commit that referenced this pull request Jul 31, 2026
> Allow template scheduling to claim a complete reduction chain as one atomic fusion unit and retain the template output identity needed by multi-output kernels. Prevent partial fusion from consuming layout or finalizer nodes before NVGEMM can validate the complete grouped pattern.
>
> Reject horizontal fusion involving NVGEMM boolean outputs and prioritize valid NVGEMM reduction chains ahead of ordinary Triton fusion candidates.
>
> Test Plan:
>
> ```bash
> lintrunner -a
> ```
>
> Authored with an AI assistant.

ghstack-source-id: 34892bf
Pull-Request: #190822
mlazos added 2 commits July 31, 2026 16:55
[ghstack-poisoned]
[ghstack-poisoned]
mlazos added a commit that referenced this pull request Aug 3, 2026
> Allow template scheduling to claim a complete reduction chain as one atomic fusion unit and retain the template output identity needed by multi-output kernels. Prevent partial fusion from consuming layout or finalizer nodes before NVGEMM can validate the complete grouped pattern.
>
> Reject horizontal fusion involving NVGEMM boolean outputs and prioritize valid NVGEMM reduction chains ahead of ordinary Triton fusion candidates.
>
> Test Plan:
>
> ```bash
> lintrunner -a
> ```
>
> Authored with an AI assistant.

ghstack-source-id: 3af01e0
Pull-Request: #190822
mlazos added 2 commits August 3, 2026 01:26
[ghstack-poisoned]
[ghstack-poisoned]
mlazos added a commit that referenced this pull request Aug 4, 2026
> Allow template scheduling to claim a complete reduction chain as one atomic fusion unit and retain the template output identity needed by multi-output kernels. Prevent partial fusion from consuming layout or finalizer nodes before NVGEMM can validate the complete grouped pattern.
>
> Reject horizontal fusion involving NVGEMM boolean outputs and prioritize valid NVGEMM reduction chains ahead of ordinary Triton fusion candidates.
>
> Test Plan:
>
> ```bash
> lintrunner -a
> ```
>
> Authored with an AI assistant.

ghstack-source-id: 53be442
Pull-Request: #190822
mlazos added 3 commits August 4, 2026 11:38
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants