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
Fix #6697: Wrong dtype when using np.asarray on DeviceNDArray #6698
Conversation
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.
Many thanks for tracking down this issue and making the PR! I think it is looking great in general:
- Tests pass for me locally with hardware and the simulator.
- The reproducer given in Wrong dtype when using np.asarray on DeviceNDArray #6697 behaves correctly with this PR (it prints out
int16
three times instead ofint16
twice thenfloat64
). - The starter patch from CUDA: Add support for passing tuples to kernels via vectorize #6563 applied on top of this PR passes all tests, and also allows the example from CUDA: Add support for passing tuples to kernels via vectorize #6563 (comment) to run correctly.
So, this PR really moves things in the right direction for both the issue #6697 and the feature request #6563.
Regarding the location of the test - the majority of tests that test device arrays, transferring them between the host and the device, and checking their dtypes and other properties are in numba/cuda/tests/cudadrv/test_cuda_ndarray.py
- would you be happy to move the test there?
Many thanks again!
move from test_array_attr.py to test_cuda_ndarray.py
Thanks for the review @gmarkall |
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.
Many thanks for the update - this is looking good to me!
@esc Could this have a CUDA buildfarm run please?
@gmarkall sure |
@stuartarchibald @sklam Do you want to look at this before it goes to RTM? |
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.
Looks good, thanks for the patch. Thanks for reviewing @gmarkall .
Many thanks for the contribution @ashutoshvarma ! |
Closes #6697
I was not sure about where tests for this should go, for now, the test is in
numba/cuda/tests/cudadrv/test_array_attr.py
.