-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Add Tensor.T attribute to reverse dimensions
#20598
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
Conversation
|
cc @ssnl |
|
Ping -- can someone review this? |
|
Wtf. I screwed something up -- didn't mean to close this. |
facebook-github-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@umanwizard has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
| typedef PyObject *(*getter)(PyObject *, void *); | ||
| typedef int (*setter)(PyObject *, PyObject *, void *); | ||
|
|
||
| PyObject *THPVariable_get_T(THPVariable *self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have the ability to do this in C++, yet? Can we add support for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, what would you like to call it? reverse_dims ? Or just T?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest T. In general, we've tried to make the C++ Tensor API match the Python API even when it means uncommon names.
facebook-github-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@umanwizard has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@umanwizard has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@umanwizard has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: For compatibility with numpy Pull Request resolved: pytorch/pytorch#20598 Differential Revision: D15499749 Pulled By: umanwizard fbshipit-source-id: f3306b496667f20169e9b28db3150d12183703bc
|
This broke Windows: |
|
@umanwizard merged this pull request in 9294de8. |
|
This PR was reverted due to breakage of |
Summary: Something flaky is going on with `test_inplace_view_saved_output` on Windows. With my PR #20598 applied, the test fails, even though there is no obvious reason it should be related, so the PR was reverted. Based on commenting out various parts of my change and re-building, I think the problem is with the name -- renaming everything from `T` to `asdf` seems to make the test stop failing. I can't be sure that this is actually the case though, since I could just be seeing patterns in non-deterministic build output... I spoke with colesbury offline and we agreed that it is okay to just disable this test on Windows for now and not block landing the main change. He will look into why it is failing. **Test Plan:** I will wait to make sure the Windows CI suite passes before landing this. Pull Request resolved: #21175 Differential Revision: D15566970 Pulled By: umanwizard fbshipit-source-id: edf223375d41faaab0a3a14dca50841f08030da3
For compatibility with numpy