Skip to content

Commit

Permalink
update oneDNN to 9ef80d173 on main (#2370)
Browse files Browse the repository at this point in the history
* update oneDNN to 9ef80d173 on main

* update softmax UT due to backend change
  • Loading branch information
chunyuan-w committed Dec 18, 2023
1 parent 760d204 commit 1364dc5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions tests/cpu/test_softmax.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ def forward(self, x):
attention_scores = torch.matmul(x, x.transpose(-1, -2))
attention_scores = attention_scores / 64
attention_scores = nn.Softmax(dim=-1)(attention_scores)
# Previously, the backend requires the pattern to be dequant-matmul-div-add-softmax
# so that they could be selected into the MHA partition.
# Now, dequant-matmul-div-softmax can hit the MHA pattern since add
# becomes optional in the pattern matcher.
# We add a softmax call here to test the functionality of ipex::softmax_ when
# it's input is an oneDNN graph fusion group.
attention_scores = nn.Softmax(dim=-1)(attention_scores)
return attention_scores


Expand Down
2 changes: 1 addition & 1 deletion third_party/ideep
Submodule ideep updated 1 files
+1 −1 mkl-dnn

0 comments on commit 1364dc5

Please sign in to comment.