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

[Relanding] Implemented torch.linalg.multi_dot #52859

Closed

Conversation

heitorschueroff
Copy link
Contributor

@heitorschueroff heitorschueroff commented Feb 25, 2021

Stack from ghstack:

This reverts commit 92a4ee1.

Added support for bfloat16 for CUDA 11 and removed fast-path for empty input tensors that was affecting autograd graph.

Differential Revision: D27402390

heitorschueroff added a commit that referenced this pull request Feb 25, 2021
This reverts commit 92a4ee1.

ghstack-source-id: 5167f83fe019e35268ff457919d7babf47470fb2
Pull Request resolved: #52859
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Feb 25, 2021

💊 CI failures summary and remediations

As of commit f637190 (more details on the Dr. CI page):


  • 1/1 failures possibly* introduced in this PR
    • 1/1 non-scanned failure(s)

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.

@heitorschueroff heitorschueroff changed the title Revert "Revert D26375734: Implemented torch.linalg.multi_dot" Implemented torch.linalg.multi_dot" Feb 25, 2021
@heitorschueroff heitorschueroff changed the title Implemented torch.linalg.multi_dot" [Relanding] Implemented torch.linalg.multi_dot" Feb 25, 2021
test/test_linalg.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@mruberry mruberry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really cool; nice work!

This reverts commit 92a4ee1.

Added support for bfloat16 for CUDA 11 and removed fast-path for empty input tensors that was affecting autograd graph.

Differential Revision: [D26672922](https://our.internmc.facebook.com/intern/diff/D26672922)

[ghstack-poisoned]
heitorschueroff added a commit that referenced this pull request Mar 1, 2021
This reverts commit 92a4ee1.

ghstack-source-id: f2910b1438fa23f94d147e672235af93606db1b1
Pull Request resolved: #52859
This reverts commit 92a4ee1.

Added support for bfloat16 for CUDA 11 and removed fast-path for empty input tensors that was affecting autograd graph.

Differential Revision: [D26672922](https://our.internmc.facebook.com/intern/diff/D26672922)

[ghstack-poisoned]
This reverts commit 92a4ee1.

Added support for bfloat16 for CUDA 11 and removed fast-path for empty input tensors that was affecting autograd graph.

Differential Revision: [D26672922](https://our.internmc.facebook.com/intern/diff/D26672922)

[ghstack-poisoned]
This reverts commit 92a4ee1.

Added support for bfloat16 for CUDA 11 and removed fast-path for empty input tensors that was affecting autograd graph.

Differential Revision: [D26672922](https://our.internmc.facebook.com/intern/diff/D26672922)

[ghstack-poisoned]
This reverts commit 92a4ee1.

Added support for bfloat16 for CUDA 11 and removed fast-path for empty input tensors that was affecting autograd graph.

Differential Revision: [D26672922](https://our.internmc.facebook.com/intern/diff/D26672922)

[ghstack-poisoned]
heitorschueroff added a commit that referenced this pull request Mar 5, 2021
This reverts commit 92a4ee1.

ghstack-source-id: 1d63b4d8965d8572f591bb95bf2bae58488e68f2
Pull Request resolved: #52859
This reverts commit 92a4ee1.

Added support for bfloat16 for CUDA 11 and removed fast-path for empty input tensors that was affecting autograd graph.

Differential Revision: [D26672922](https://our.internmc.facebook.com/intern/diff/D26672922)

[ghstack-poisoned]
@heitorschueroff heitorschueroff changed the title [Relanding] Implemented torch.linalg.multi_dot" [Relanding] Implemented torch.linalg.multi_dot Mar 25, 2021
This reverts commit 92a4ee1.

Added support for bfloat16 for CUDA 11 and removed fast-path for empty input tensors that was affecting autograd graph.

Differential Revision: [D26672922](https://our.internmc.facebook.com/intern/diff/D26672922)

[ghstack-poisoned]
This reverts commit 92a4ee1.

Added support for bfloat16 for CUDA 11 and removed fast-path for empty input tensors that was affecting autograd graph.

Differential Revision: [D26672922](https://our.internmc.facebook.com/intern/diff/D26672922)

[ghstack-poisoned]
@heitorschueroff
Copy link
Contributor Author

Does multi_dot support batched products i.e. processing a list of matrices of shapes BxP1xP2, BxP2xP3, BxP3xP4?

Also may be interesting to have a matrix product reduction method, e.g. for a tensor of BxWxPxP and dim it would be equivalent of batched multi_dot(*input.unbind(dim)) (but maybe having more efficient computation because of known contiguity / layout)

It does not currently support broadcasting which is in line with NumPy. However, we could consider adding broadcast in a future PR.

@vadimkantorov
Copy link
Contributor

I am not even talking of broadcasting, just regular batching...

@heitorschueroff
Copy link
Contributor Author

I am not even talking of broadcasting, just regular batching...

My mistake, I meant to say batching. It does not support batching.

This reverts commit 92a4ee1.

Added support for bfloat16 for CUDA 11 and removed fast-path for empty input tensors that was affecting autograd graph.

Differential Revision: [D27402390](https://our.internmc.facebook.com/intern/diff/D27402390)

[ghstack-poisoned]
This reverts commit 92a4ee1.

Added support for bfloat16 for CUDA 11 and removed fast-path for empty input tensors that was affecting autograd graph.

Differential Revision: [D27402390](https://our.internmc.facebook.com/intern/diff/D27402390)

[ghstack-poisoned]
This reverts commit 92a4ee1.

Added support for bfloat16 for CUDA 11 and removed fast-path for empty input tensors that was affecting autograd graph.

Differential Revision: [D27402390](https://our.internmc.facebook.com/intern/diff/D27402390)

[ghstack-poisoned]
This reverts commit 92a4ee1.

Added support for bfloat16 for CUDA 11 and removed fast-path for empty input tensors that was affecting autograd graph.

Differential Revision: [D27402390](https://our.internmc.facebook.com/intern/diff/D27402390)

[ghstack-poisoned]
…ting on "[Relanding] Implemented torch.linalg.multi_dot"


This reverts commit 92a4ee1.

Added support for bfloat16 for CUDA 11 and removed fast-path for empty input tensors that was affecting autograd graph.

Differential Revision: [D27402390](https://our.internmc.facebook.com/intern/diff/D27402390)

[ghstack-poisoned]
This reverts commit 92a4ee1.

Added support for bfloat16 for CUDA 11 and removed fast-path for empty input tensors that was affecting autograd graph.

Differential Revision: [D27402390](https://our.internmc.facebook.com/intern/diff/D27402390)

[ghstack-poisoned]
This reverts commit 92a4ee1.

Added support for bfloat16 for CUDA 11 and removed fast-path for empty input tensors that was affecting autograd graph.

Differential Revision: [D27402390](https://our.internmc.facebook.com/intern/diff/D27402390)

[ghstack-poisoned]
This reverts commit 92a4ee1.

Added support for bfloat16 for CUDA 11 and removed fast-path for empty input tensors that was affecting autograd graph.

Differential Revision: [D27402390](https://our.internmc.facebook.com/intern/diff/D27402390)

[ghstack-poisoned]
This reverts commit 92a4ee1.

Added support for bfloat16 for CUDA 11 and removed fast-path for empty input tensors that was affecting autograd graph.

Differential Revision: [D27402390](https://our.internmc.facebook.com/intern/diff/D27402390)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

@heitorschueroff merged this pull request in 5d68b36.

@facebook-github-bot facebook-github-bot deleted the gh/heitorschueroff/53/head branch April 4, 2021 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants