-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Have softmax handle any dim via permutation
Summary: Since the backend doesn't yet support reduction over non-last-dimensions, I'm having the frontend add two permute ops to move the desired dimension to the end of the shape. I considered modifying the softmax template code instead of creating new op instances, but the `permute()` op has a bunch of logic for dispatching to more specialized versions of itself, and it seems the easiest way to take advantage of that is by creating instances of the permute op. Differential Revision: D47506000 fbshipit-source-id: 10c8685c22dda72be4e2671b4c1369ac80062f1f
- Loading branch information
1 parent
6305588
commit f6ecbed
Showing
2 changed files
with
9 additions
and
3 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