[inductor] fix linear add bias pattern (#128473) #128577
Merged
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.
Fix #128287. Previous the assertion in
linear_add_bias
are pretty badbecause the
name
can be changed to_reorder_linear_weight_id, permute_default_id
if we have more than 1 reorder/permute.Check
target
insteadname
can solve this issue.UT is also updated to have match more than 1
linear_add_bias
pattern to cover this case.Co-authored-by: Jiong Gong [email protected]
Pull Request resolved: #128473
Approved by: https://github.com/jgong5
(cherry picked from commit c53d65b)
Fixes #ISSUE_NUMBER
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang