-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Test reading __cuda_array_interface__
inferred strides.
#31451
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
💊 CircleCI build failures summary and remediationsAs of commit 92b8f5e: Waiting for builds of commit 92b8f5e 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 on the GitHub issue tracker. This comment has been revised 1 time. |
@unittest.skipIf(not TEST_CUDA, "No cuda") | ||
@unittest.skipIf(not TEST_NUMBA_CUDA, "No numba.cuda") | ||
def test_from_cuda_array_interface_inferred_strides(self): | ||
"""torch.as_tensor(numba_ary) should have correct inferred (contiguous) strides""" |
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.
Nit: I think numba_ary
read better as numba_array
; I haven't seen too many usages of "ary" to mean array in the past
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 agree -- I was just following the style of the rest of the test here (which seems useful, since this test should just be combined with others once we make the test less strict).
test/test_numba_integration.py
Outdated
"""torch.as_tensor(numba_ary) should have correct inferred (contiguous) strides""" | ||
# This could, in theory, be combined with test_from_cuda_array_interface but that test | ||
# is overly strict: it checks that the exported protocols are exactly the same, which | ||
# cannot handle differening exported protocol versions. |
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.
nit: s/differening/differing
The PR that fixed this, #24947, didn't add a test. Fixes: #31443 Differential Revision: [D19170020](https://our.internmc.facebook.com/intern/diff/D19170020) [ghstack-poisoned]
) Summary: Pull Request resolved: pytorch#31451 The PR that fixed this, pytorch#24947, didn't add a test. Fixes: pytorch#31443 Test Plan: Imported from OSS Differential Revision: D19170020 Pulled By: gchanan fbshipit-source-id: bdbf09989ac8a61b1b70bb1ddee103caa8ef435b
Stack from ghstack:
__cuda_array_interface__
inferred strides. #31451 Test reading__cuda_array_interface__
inferred strides.The PR that fixed this, #24947, didn't add a test.
Fixes: #31443
Differential Revision: D19170020