-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Add negative dimension to transpose #792
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
|
I think it'd be better to add annotations to arguments in cwrap, or use the |
|
This is the cleanest way I could figure out. Can't think of any other way to modify the |
|
This looks better. Can you please add a test for it? |
|
A test asserting that transpose with positive and negative dimensions give the same result is good enough? |
|
Yeah. Just do a for loop from 0 to nDim, and use positive and negative values to ensure that they yield the same result. |
|
Great. Added a test. |
|
@pytorchbot test this please |
|
The builds are failing for CUDA. Maybe you should add |
|
Adding I think either this needs to go to the backend libs as a wrapper like |
colesbury
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.
Are you sure you can't do this with before_call? That seems like it would be much simpler.
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.
|
@pytorchbot test this please |
|
Thanks a lot Hardik! |
Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
* [sync BN] support non-uniform batch size across process group. TODO: test should be added once cleaned up. * updating unit tests * new unit tests for different inputs * cleaning
Fixes #657
Tested locally.