ger is an alias to outer, not the other way around#59448
ger is an alias to outer, not the other way around#59448albanD wants to merge 2 commits intogh/albanD/94/basefrom
Conversation
[ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit e1da5df (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. |
tools/autograd/derivatives.yaml
Outdated
| self: grad.mv(vec2.conj()) | ||
| vec2: grad.t().mv(self.conj()) | ||
| - name: outer(Tensor self, Tensor vec2) -> Tensor | ||
| self: grad.mm(vec2.unsqueeze(-1).conj()).squeeze(-1) |
There was a problem hiding this comment.
I had to modify this formula because outer supports half dtype right now but mv does not.
There was a problem hiding this comment.
We should probably add a comment and file an issue about replacing the formula with mv if/when it ever gets half support...
Are there any performance concerns here? I'm not too worried about 2 extra views here and I've rarely seen ger/outer used in the wild
There was a problem hiding this comment.
Actually due to more issues with cuda devices, I'll completely remove that formula and let this be autodiffed.
Note that outer was already autodiffed so that shouldn't change anything for this one.
And ger is deprecated so people should not be using it.
|
@albanD has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Differential Revision: [D28900487](https://our.internmc.facebook.com/intern/diff/D28900487) [ghstack-poisoned]
|
This should be ready for final review now! |
|
Reverting as this belongs to a PR that broke some forward_mode_AD tests, e.g., https://app.circleci.com/pipelines/github/pytorch/pytorch/332766/workflows/901123bb-fbd5-48ef-b654-8e6926929c8f/jobs/13988206 |
|
This pull request has been reverted by 82466e0. |
Summary: Pull Request resolved: pytorch#59448 Test Plan: Imported from OSS Reviewed By: zou3519 Differential Revision: D28900487 Pulled By: albanD fbshipit-source-id: e9065c5b29078d92ea9b746e188ebc1e62a407a0
Stack from ghstack:
Differential Revision: D28900487