Skip to content

[Inductor] Fallback to super().get_read_writes when epilogue_fusion_user_defined_triton_kernel is disabled#176832

Closed
coufon wants to merge 1 commit intopytorch:mainfrom
coufon:export-D95727036
Closed

[Inductor] Fallback to super().get_read_writes when epilogue_fusion_user_defined_triton_kernel is disabled#176832
coufon wants to merge 1 commit intopytorch:mainfrom
coufon:export-D95727036

Conversation

@coufon
Copy link
Copy Markdown
Contributor

@coufon coufon commented Mar 8, 2026

Summary: PR #173662 introduces a new fusion epilogue_fusion_user_defined_triton_kernel. It overrides the get_read_writes method of UserDefinedTritonKernel, even when epilogue_fusion_user_defined_triton_kernel is disabled. This may cause regression to existing Triton kernel CUDA graph for other models. This diff fixed the regression by falling back to the original get_read_writes when epilogue_fusion_user_defined_triton_kernel is disabled

Differential Revision: D95727036

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

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Mar 8, 2026

🔗 Helpful Links

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

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

✅ You can merge normally! (4 Unrelated Failures)

As of commit 904933b with merge base 82374f2 (image):

FLAKY - The following job failed but was likely due to flakiness present on trunk:

BROKEN TRUNK - The following jobs failed but was present on the merge base:

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

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

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

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Mar 8, 2026

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Mar 8, 2026

@coufon has exported this pull request. If you are a Meta employee, you can view the originating Diff in D95727036.

@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label Mar 8, 2026
coufon added a commit to coufon/pytorch that referenced this pull request Mar 8, 2026
…ser_defined_triton_kernel is disabled (pytorch#176832)

Summary:

PR pytorch#173662 introduces a new fusion `epilogue_fusion_user_defined_triton_kernel`. It overrides the `get_read_writes` method of `UserDefinedTritonKernel`, even when `epilogue_fusion_user_defined_triton_kernel` is disabled. This may cause regression to existing Triton kernel CUDA graph for other models. This diff fixed the regression by falling back to the original `get_read_writes` when `epilogue_fusion_user_defined_triton_kernel` is disabled

Reviewed By: AmesingFlank

Differential Revision: D95727036
@coufon coufon force-pushed the export-D95727036 branch from 951d081 to 220b4d0 Compare March 8, 2026 18:03
coufon added a commit to coufon/pytorch that referenced this pull request Mar 8, 2026
…ser_defined_triton_kernel is disabled (pytorch#176832)

Summary:

PR pytorch#173662 introduces a new fusion `epilogue_fusion_user_defined_triton_kernel`. It overrides the `get_read_writes` method of `UserDefinedTritonKernel`, even when `epilogue_fusion_user_defined_triton_kernel` is disabled. This may cause regression to existing Triton kernel CUDA graph for other models. This diff fixed the regression by falling back to the original `get_read_writes` when `epilogue_fusion_user_defined_triton_kernel` is disabled

Reviewed By: AmesingFlank

Differential Revision: D95727036
@coufon coufon force-pushed the export-D95727036 branch from 220b4d0 to 9b292c1 Compare March 8, 2026 18:03
…ser_defined_triton_kernel is disabled (pytorch#176832)

Summary:
Pull Request resolved: pytorch#176832

PR pytorch#173662 introduces a new fusion `epilogue_fusion_user_defined_triton_kernel`. It overrides the `get_read_writes` method of `UserDefinedTritonKernel`, even when `epilogue_fusion_user_defined_triton_kernel` is disabled. This may cause regression to existing Triton kernel CUDA graph for other models. This diff fixed the regression by falling back to the original `get_read_writes` when `epilogue_fusion_user_defined_triton_kernel` is disabled

Reviewed By: AmesingFlank

Differential Revision: D95727036
@coufon coufon force-pushed the export-D95727036 branch from 9b292c1 to 904933b Compare March 8, 2026 18:07
@AmesingFlank
Copy link
Copy Markdown
Contributor

@pytorchmergebot merge

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge failed

Reason: This PR needs a release notes: label
If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Details for Dev Infra team Raised by workflow job

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Mar 9, 2026

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@AmesingFlank AmesingFlank added the topic: not user facing topic category label Mar 9, 2026
@AmesingFlank
Copy link
Copy Markdown
Contributor

@pytorchmergebot merge

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

v0i0 added a commit to pytorch/helion that referenced this pull request Mar 11, 2026
The inductor NameError flake (buf1 not defined) that prompted the pin
has been fixed upstream by multiple PyTorch PRs:
- pytorch/pytorch#176772 (fix is_unfusable scheduler logic)
- pytorch/pytorch#176832 (guard get_read_writes behind config flag)
- pytorch/pytorch#177062 (fix MultiOutput write deps)

The root cause was pytorch/pytorch#173662 which overrode
UserDefinedTritonKernel.get_read_writes() even when the epilogue
fusion feature was disabled, breaking buffer scheduling for
TritonTemplateBuffer subclasses like Helion's HelionTemplateBuffer.

Verified the previously-failing test passes against current PyTorch main.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0i0 added a commit to pytorch/helion that referenced this pull request Mar 12, 2026
The inductor NameError flake (buf1 not defined) that prompted the pin
has been fixed upstream by multiple PyTorch PRs:
- pytorch/pytorch#176772 (fix is_unfusable scheduler logic)
- pytorch/pytorch#176832 (guard get_read_writes behind config flag)
- pytorch/pytorch#177062 (fix MultiOutput write deps)

The root cause was pytorch/pytorch#173662 which overrode
UserDefinedTritonKernel.get_read_writes() even when the epilogue
fusion feature was disabled, breaking buffer scheduling for
TritonTemplateBuffer subclasses like Helion's HelionTemplateBuffer.

Verified the previously-failing test passes against current PyTorch main.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0i0 added a commit to pytorch/helion that referenced this pull request Mar 12, 2026
The inductor NameError flake (buf1 not defined) that prompted the pin
has been fixed upstream by multiple PyTorch PRs:
- pytorch/pytorch#176772 (fix is_unfusable scheduler logic)
- pytorch/pytorch#176832 (guard get_read_writes behind config flag)
- pytorch/pytorch#177062 (fix MultiOutput write deps)

The root cause was pytorch/pytorch#173662 which overrode
UserDefinedTritonKernel.get_read_writes() even when the epilogue
fusion feature was disabled, breaking buffer scheduling for
TritonTemplateBuffer subclasses like Helion's HelionTemplateBuffer.

Verified the previously-failing test passes against current PyTorch main.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
EmanueleCoradin pushed a commit to EmanueleCoradin/pytorch that referenced this pull request Mar 30, 2026
…ser_defined_triton_kernel is disabled (pytorch#176832)

Summary: PR pytorch#173662 introduces a new fusion `epilogue_fusion_user_defined_triton_kernel`. It overrides the `get_read_writes` method of `UserDefinedTritonKernel`, even when `epilogue_fusion_user_defined_triton_kernel` is disabled. This may cause regression to existing Triton kernel CUDA graph for other models. This diff fixed the regression by falling back to the original `get_read_writes` when `epilogue_fusion_user_defined_triton_kernel` is disabled

Differential Revision: D95727036

Pull Request resolved: pytorch#176832
Approved by: https://github.com/AmesingFlank
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