Repository navigation
Conversation
nvMatmulHeuristics reports tile M per CTA, while CUTLASS reports the
pair-wide tile for true 2-CTA kernels. Comparing those values directly
prevented the recommended 2-CTA dense kernels from entering autotuning.
Normalize true pair kernels using the implementation's use_2cta_instrs
metadata, with a guarded design fallback for older kernels. The design flag
alone was not used because block-scaled operators set it for some 1-CTA
kernels. Keep the hand-tuned supplement table in raw design coordinates so
distinct 128- and 256-row candidates remain selectable.
Test Plan:
```
PYTHONDONTWRITEBYTECODE=1 python -c 'import importlib.util,runpy,sys; from pathlib import Path; import torch.utils._triton as t; setattr(t,"has_triton_reduction_ordering",getattr(t,"has_triton_reduction_ordering",lambda: False)); n="torch._inductor.heuristics.template.nv_universal_gemm"; s=importlib.util.spec_from_file_location(n,Path("torch/_inductor/heuristics/template/nv_universal_gemm.py").resolve()); m=importlib.util.module_from_spec(s); sys.modules[n]=m; s.loader.exec_module(m); sys.argv=["test/inductor/test_nv_universal_gemm.py","-k","filter_kernels","-k","supplement_configs"]; runpy.run_path("test/inductor/test_nv_universal_gemm.py",run_name="__main__")'
```
Passed 6 tests. B300 performance validation was not available on the H100 host.
```
lintrunner -a
```
Exited successfully; the uninitialized refreshed worktree emitted unrelated
repo-wide Pyrefly environment diagnostics.
```
lintrunner -a --skip PYREFLY torch/_inductor/heuristics/template/nv_universal_gemm.py test/inductor/test_nv_universal_gemm.py
```
Passed with no lint issues.
Fixes #196313
Authored with assistance from an AI coding agent.
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/198293
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (2 Unrelated Failures)As of commit a00a136 with merge base 6a895d1 ( UNSTABLE - The following jobs are marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Contributor
Author
AI-Review
No verified issues found. |
mlazos
marked this pull request as ready for review
September 23, 2026 22:44
drisspg
approved these changes
Sep 24, 2026
Contributor
Author
|
@pytorchbot merge |
Collaborator
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human commentary: Fixes a bug where 2-CTA kernels weren't considered.
AI-generated draft:
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo