-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support expand_dims
#56774
Comments
Thanks @asi1024. +1 for adding The one question I have is whether it should be a |
Adding an alias is straightforward, too. See the note in native_functions.yaml. If unsqueeze doesn't already have an OpInfo I'd first submit a PR adding an OpInfo for it, since OpInfos are how we test aliasing now.
Most functions in the |
unsqueeze doesn't have an OnInfo currently. I can submit a PR for it if I just have to add |
You can just add it as a regular OpInfo ;) |
Summary: This PR is ready for pytorch#56774. (cc: mruberry, emcastillo, kmaehashi) Pull Request resolved: pytorch#56924 Reviewed By: H-Huang Differential Revision: D28026529 Pulled By: mruberry fbshipit-source-id: 3afb33bb2999110c565728cd761d3e7d9d3fc82b
Summary: This PR is ready for pytorch#56774. (cc: mruberry, emcastillo, kmaehashi) Pull Request resolved: pytorch#56924 Reviewed By: H-Huang Differential Revision: D28026529 Pulled By: mruberry fbshipit-source-id: 3afb33bb2999110c565728cd761d3e7d9d3fc82b
馃殌 Feature
Support
torch.expand_dims
.(cc: @mruberry, @rgommers, @emcastillo and @kmaehashi)
Motivation and Pitch
To enhance the compatibility with NumPy鈥檚 interface (c.f. #38349).
Currently PyTorch supports the same functionality with a different function name:
torch.unsqueeze
, but I would like to support an alias to improve compatibility with NumPy and Python array API standard (#54581).References
cc @mruberry @rgommers @heitorschueroff @pmeier
The text was updated successfully, but these errors were encountered: