Conversation
implemented via a wrapper Fixes: pytorch#9929
| variants: function | ||
|
|
||
| - func: einsum(std::string equation, TensorList tensors) -> Tensor | ||
| - func: _einsum(std::string equation, TensorList tensors) -> Tensor |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Thanks to fmassa for the suggestion! if the method to fix it is not as pretty, it is my own fault, though.
facebook-github-bot
left a comment
There was a problem hiding this comment.
SsnL has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
| """ | ||
| if len(operands) == 1 and isinstance(operands[0], (list, tuple)): | ||
| # the old interface of passing the operands as one list argument | ||
| operands = operands[0] |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
| return P, L, U | ||
|
|
||
|
|
||
| def einsum(equation, *operands): |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
We don't, torch.functional.einsum (no nn) is imported as torch.einsum.
|
|
Oh I see. Thanks for the clarification @t-vi ! |
|
I think the CI failure isn't this patch. Should we deprecate having a list as second argument? |
|
Let's keep it like this for now and think about if the deprecation should happen later. Could you rebase this pr @t-vi? |
facebook-github-bot
left a comment
There was a problem hiding this comment.
soumith has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Implemented via a wrapper, thank you Richard for the suggestion!
Fixes: #9929