Support expand_dims#57116
Conversation
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit fde1880 (more details on the Dr. CI page):
🕵️ 2 new failures recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
| Job | Step | Action |
|---|---|---|
| Config Processing Error (Don't rerun) | 🔁 rerun | |
| Run clang-format | 🔁 rerun |
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.
| CompositeExplicitAutograd: unsqueeze_ | ||
|
|
||
| # expand_dims, alias of unsqueeze | ||
| - func: expand_dims(Tensor(a) self, int dim) -> Tensor(a) |
There was a problem hiding this comment.
What's your thinking on aliasing the inplace version of the operation, unsqueeze_, as well?
There was a problem hiding this comment.
The in-place version is out of Array API standard, so it does not necessarily need to be supported, but I think it's OK to support it. Done in 83a21ff!
There was a problem hiding this comment.
Looks great; I made one small tweak to the inplace method docs. I think this is now ready to merge!
|
@mruberry has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
|
Hey @asi1024, just fyi I'm going to need to follow-up on one internal hitch with this PR, so it may not land immediately |
|
@mruberry Thank you! Please let me know if there is any updates 😃 |
I will; we're preparing for the PyTorch 1.9 release now, however, so it might take some time to follow-up, unfortunately. |
|
@mruberry Kindly ping 😃 |
Details, from #58742 (comment): I assume this is a non-public package. Will it be possible to get them to fix it before the 1.11 release @mruberry? |
Hard to know the timeline but I certainly hope so. I'm reviewing these internal failures today so hope to know more soon. |
|
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
Fixes #56774
This PR implements
torch.expand_dimsfor the compatibility with NumPy’s interface.cc: @mruberry, @rgommers, @emcastillo and @kmaehashi