[ET-VK] Fix FuseClampPass incorrectly fusing conv+activation when conv has multiple users#17430
Merged
meta-codesync[bot] merged 5 commits intogh/SS-JIA/428/basefrom Feb 13, 2026
Merged
Conversation
…v has multiple users The FuseClampPass fuses patterns like conv -> relu into a single conv_with_clamp op. However, it did not check whether the convolution node's output has multiple consumers before fusing. When a conv output feeds both a relu and another op (e.g. a skip connection), fusing the relu into the conv incorrectly applies the activation to all consumers, corrupting the skip connection values. This was causing incorrect output in the MetaNet GreenScreen model, where decoder projection convolutions feed both into ResidualConvUnit (through relu) and into skip connections (without relu). The fix adds a check that the preceding conv has exactly one user before allowing fusion. Differential Revision: [D93145845](https://our.internmc.facebook.com/intern/diff/D93145845/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17430
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 1 Cancelled JobAs of commit 5f44c12 with merge base dcfd12d ( NEW FAILURE - The following job has failed:
CANCELLED JOB - The following job was cancelled. Please retry:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This was referenced Feb 12, 2026
This PR needs a
|
…on when conv has multiple users" The FuseClampPass fuses patterns like conv -> relu into a single conv_with_clamp op. However, it did not check whether the convolution node's output has multiple consumers before fusing. When a conv output feeds both a relu and another op (e.g. a skip connection), fusing the relu into the conv incorrectly applies the activation to all consumers, corrupting the skip connection values. This was causing incorrect output in the MetaNet GreenScreen model, where decoder projection convolutions feed both into ResidualConvUnit (through relu) and into skip connections (without relu). The fix adds a check that the preceding conv has exactly one user before allowing fusion. Differential Revision: [D93145845](https://our.internmc.facebook.com/intern/diff/D93145845/) [ghstack-poisoned]
manuelcandales
approved these changes
Feb 12, 2026
added 3 commits
February 12, 2026 15:34
…on when conv has multiple users" The FuseClampPass fuses patterns like conv -> relu into a single conv_with_clamp op. However, it did not check whether the convolution node's output has multiple consumers before fusing. When a conv output feeds both a relu and another op (e.g. a skip connection), fusing the relu into the conv incorrectly applies the activation to all consumers, corrupting the skip connection values. This was causing incorrect output in the MetaNet GreenScreen model, where decoder projection convolutions feed both into ResidualConvUnit (through relu) and into skip connections (without relu). The fix adds a check that the preceding conv has exactly one user before allowing fusion. Differential Revision: [D93145845](https://our.internmc.facebook.com/intern/diff/D93145845/) [ghstack-poisoned]
…on when conv has multiple users" The FuseClampPass fuses patterns like conv -> relu into a single conv_with_clamp op. However, it did not check whether the convolution node's output has multiple consumers before fusing. When a conv output feeds both a relu and another op (e.g. a skip connection), fusing the relu into the conv incorrectly applies the activation to all consumers, corrupting the skip connection values. This was causing incorrect output in the MetaNet GreenScreen model, where decoder projection convolutions feed both into ResidualConvUnit (through relu) and into skip connections (without relu). The fix adds a check that the preceding conv has exactly one user before allowing fusion. Differential Revision: [D93145845](https://our.internmc.facebook.com/intern/diff/D93145845/) [ghstack-poisoned]
…on when conv has multiple users" The FuseClampPass fuses patterns like conv -> relu into a single conv_with_clamp op. However, it did not check whether the convolution node's output has multiple consumers before fusing. When a conv output feeds both a relu and another op (e.g. a skip connection), fusing the relu into the conv incorrectly applies the activation to all consumers, corrupting the skip connection values. This was causing incorrect output in the MetaNet GreenScreen model, where decoder projection convolutions feed both into ResidualConvUnit (through relu) and into skip connections (without relu). The fix adds a check that the preceding conv has exactly one user before allowing fusion. Differential Revision: [D93145845](https://our.internmc.facebook.com/intern/diff/D93145845/) [ghstack-poisoned]
779aec8
into
gh/SS-JIA/428/base
193 of 197 checks passed
SS-JIA
pushed a commit
that referenced
this pull request
Feb 13, 2026
… conv has multiple users Pull Request resolved: #17430 The FuseClampPass fuses patterns like conv -> relu into a single conv_with_clamp op. However, it did not check whether the convolution node's output has multiple consumers before fusing. When a conv output feeds both a relu and another op (e.g. a skip connection), fusing the relu into the conv incorrectly applies the activation to all consumers, corrupting the skip connection values. This was causing incorrect output in the MetaNet GreenScreen model, where decoder projection convolutions feed both into ResidualConvUnit (through relu) and into skip connections (without relu). The fix adds a check that the preceding conv has exactly one user before allowing fusion. ghstack-source-id: 340983071 @exported-using-ghexport Differential Revision: [D93145845](https://our.internmc.facebook.com/intern/diff/D93145845/)
chizkiyahu
pushed a commit
to chizkiyahu/executorch
that referenced
this pull request
Feb 23, 2026
… conv has multiple users Pull Request resolved: pytorch#17430 The FuseClampPass fuses patterns like conv -> relu into a single conv_with_clamp op. However, it did not check whether the convolution node's output has multiple consumers before fusing. When a conv output feeds both a relu and another op (e.g. a skip connection), fusing the relu into the conv incorrectly applies the activation to all consumers, corrupting the skip connection values. This was causing incorrect output in the MetaNet GreenScreen model, where decoder projection convolutions feed both into ResidualConvUnit (through relu) and into skip connections (without relu). The fix adds a check that the preceding conv has exactly one user before allowing fusion. ghstack-source-id: 340983071 @exported-using-ghexport Differential Revision: [D93145845](https://our.internmc.facebook.com/intern/diff/D93145845/)
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.
Stack from ghstack (oldest at bottom):
The FuseClampPass fuses patterns like conv -> relu into a single conv_with_clamp op. However, it did not check whether the convolution node's output has multiple consumers before fusing. When a conv output feeds both a relu and another op (e.g. a skip connection), fusing the relu into the conv incorrectly applies the activation to all consumers, corrupting the skip connection values.
This was causing incorrect output in the MetaNet GreenScreen model, where decoder projection convolutions feed both into ResidualConvUnit (through relu) and into skip connections (without relu). The fix adds a check that the preceding conv has exactly one user before allowing fusion.
Differential Revision: D93145845