forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[inductor] fix linear add bias pattern (pytorch#128473)
Fix pytorch#128287. Previous the assertion in `linear_add_bias` are pretty bad ``` assert packed_weight_node.name == "_reorder_linear_weight" assert transpose_weight_node.name == "permute_default" ``` because the `name` can be changed to `_reorder_linear_weight_id, permute_default_id` if we have more than 1 reorder/permute. Check `target` instead `name` 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 <jiong.gong@intel.com> Pull Request resolved: pytorch#128473 Approved by: https://github.com/jgong5 (cherry picked from commit c53d65b)
- Loading branch information
Showing
2 changed files
with
12 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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