Skip to content

Fix SimplifiedLayerNormFusion scale shape validation - #32058

Draft
Tianlei Wu (tianleiwu) with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-simplified-layer-norm-fusion
Draft

Fix SimplifiedLayerNormFusion scale shape validation#32058
Tianlei Wu (tianleiwu) with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-simplified-layer-norm-fusion

Conversation

Copilot AI commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Description

  • Require the Mul scale to be provably broadcastable without expanding the normalized input.
  • Select the scale by graph connectivity rather than input rank.
  • Add coverage for incompatible, dynamic, and rank-1 shapes.

Motivation and Context

SimplifiedLayerNormFusion could replace a valid expanding Mul—for example, [1, 1] * [2] → [1, 2]—with SimplifiedLayerNormalization, which preserves the input shape and rejects that scale at runtime. The fusion now remains unfused when scale compatibility cannot be proven.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI and others added 2 commits August 13, 2026 07:24
Co-authored-by: tianleiwu <30328909+tianleiwu@users.noreply.github.com>
Co-authored-by: tianleiwu <30328909+tianleiwu@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix SimplifiedLayerNormFusion incorrect fusion of Mul node Fix SimplifiedLayerNormFusion scale shape validation Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SimplifiedLayerNormFusion Incorrectly Fuses Downstream Mul with Shape-Incompatible Scale, Causing Runtime Shape Error

2 participants