Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have softmax handle any dim via permutation #832

Closed
wants to merge 1 commit into from

Conversation

int3
Copy link
Contributor

@int3 int3 commented Jul 17, 2023

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

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Jul 17, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D47506000

Summary:
Pull Request resolved: facebookincubator#832

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.

Reviewed By: aakhundov

Differential Revision: D47506000

fbshipit-source-id: b3522fdbb0154d9caa5a4865653aec1816de6bc9
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D47506000

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 737067f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants