Skip to content

[inductor][NVGEMM] Support swap_ab reduction epilogues - #195538

Closed
mlazos wants to merge 3 commits into
gh/mlazos/316/basefrom
gh/mlazos/316/head
Closed

mlazos wants to merge 3 commits into
gh/mlazos/316/basefrom
gh/mlazos/316/head

Conversation

@mlazos

@mlazos mlazos commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Orient generated reduction geometry, output layouts, and runtime tensors when NVGEMM swaps GEMM operands. Dense and block-scaled epilogues continue to use the shared generated source, combine, and finalizer callbacks.

Keep the kernel reduction mechanism unchanged. Candidate validation filters physical tile layouts that cross CTA or warp ownership, leaving valid configurations in the normal autotuning set and falling back safely when a layout cannot implement the reduction.

Test Plan

PYTHONPATH=/data/users/mlazos/pytorch/agent_space/runtime_overlay PYTORCH_BOUNDARY_ROOT=$PWD python test/inductor/test_nv_universal_gemm.py -k swap_ab
PYTHONPATH=/data/users/mlazos/pytorch/agent_space/runtime_overlay PYTORCH_BOUNDARY_ROOT=$PWD python test/inductor/test_nv_universal_gemm.py -k grouped_reduce
spin quicklint
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 Sep 1, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit fbd3b20 with merge base 3ee461f (image):

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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

[ghstack-poisoned]
@mlazos

mlazos commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor Author

AI-Review

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


No verified issues found.

[ghstack-poisoned]
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Starting merge as part of PR stack under #195539

1 similar comment
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Starting merge as part of PR stack under #195539

pytorchmergebot pushed a commit that referenced this pull request Sep 10, 2026
Generate vendored dense EFC variants for the validated SM100 N-tile widths through 256, including 160, 192, and 224. This makes the configurations available to nvMatmulHeuristics without retaining them unconditionally.

Keep the existing supplemented benchmark space unchanged. Wider candidates enter autotuning only when nvMatmulHeuristics selects them, avoiding additional profiling by default.

## Test Plan

```bash
PYTHONPATH=/data/users/mlazos/pytorch/agent_space/runtime_overlay PYTORCH_BOUNDARY_ROOT=$PWD python test/inductor/test_nv_universal_gemm.py TestNVUniversalGemm.test_vendored_dense_efc_exposes_wide_n_tiles -v
lintrunner -a
```

Authored with an AI assistant.

Pull Request resolved: #195539
Approved by: https://github.com/karthickai
ghstack dependencies: #192298, #190822, #191514, #191515, #190825, #192928, #195538
@github-actions
github-actions Bot deleted the gh/mlazos/316/head branch November 14, 2026 01:43
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.

3 participants