Skip to content
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

test: cuda integration tests #3065

Merged
merged 14 commits into from
Apr 4, 2024
Merged

Conversation

ManasviGoyal
Copy link
Collaborator

No description provided.

@ManasviGoyal ManasviGoyal added the gpu Concerns the GPU implementation (backend = "cuda') label Mar 28, 2024
@jpivarski
Copy link
Member

I want you to be aware that I removed two kernel-test-data.json tests in 2bcb015 (#3064 (comment)) because they were failing—that's probably important. Does the status flag turn on and off tests without having to delete them? (It's too bad JSON can't be commented out the way that YAML can.)

Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran all the new tests, and they all work on my GPU.

====================== test session starts =======================
platform linux -- Python 3.10.14, pytest-8.1.1, pluggy-1.4.0
Matplotlib: 3.8.3
Freetype: 2.12.1
rootdir: /home/jpivarski/irishep/awkward
configfile: pyproject.toml
plugins: forked-1.6.0, typeguard-4.2.1, xdist-3.5.0, reverse-1.7.0, mpl-0.17.0, mock-3.14.0, timeout-2.2.0, cov-5.0.0, anyio-4.3.0
collected 463 items                                              

tests-cuda/test_1276_cuda_num.py .........                 [  1%]
tests-cuda/test_1276_cuda_transfers.py ................    [  5%]
tests-cuda/test_1276_cupy_interop.py .                     [  5%]
tests-cuda/test_1276_from_cupy.py .....                    [  6%]
tests-cuda/test_1300_same_for_numba_cuda.py .............. [  9%]
.........                                                  [ 11%]
tests-cuda/test_1381_check_errors.py .                     [ 11%]
tests-cuda/test_1809_array_cuda_jit.py ..............      [ 14%]
tests-cuda/test_2922a_new_cuda_kernels.py ................ [ 18%]
......................................................     [ 30%]
tests-cuda/test_2922b_new_cuda_kernels.py ................ [ 33%]
.............                                              [ 36%]
tests-cuda/test_3065a_cuda_kernels.py .................... [ 40%]
.......................................................... [ 53%]
.......................................................... [ 65%]
.......................................................... [ 78%]
.........................................                  [ 87%]
tests-cuda/test_3065b_cuda_kernels.py .................... [ 91%]
....                                                       [ 92%]
tests-cuda/test_3065c_cuda_kernels.py .................... [ 96%]
................                                           [100%]

====================== 463 passed in 12.90s ======================

(as well as all the kernel unit tests). I have some questions below, but no complaints. Go ahead and merge this PR whenever you're ready!

@ManasviGoyal
Copy link
Collaborator Author

ManasviGoyal commented Apr 3, 2024

I want you to be aware that I removed two kernel-test-data.json tests in 2bcb015 (#3064 (comment)) because they were failing—that's probably important. Does the status flag turn on and off tests without having to delete them? (It's too bad JSON can't be commented out the way that YAML can.)

@jpivarski The status flag turns off all the tests for a particular kernel. We can't turn off off a specific test with that.

I saw your comment about that earlier. I checked and they were failing only for Python kernels. Were there any errors in the cuda tests too on your GPU?

Due to the changes to promotion in Numpy 2.x, it gives OverflowError: Python integer 256 out of bounds for uint8. It needs to be explicitly promoted now. I will create a issue for this and fix it separately.

@jpivarski
Copy link
Member

Were there any errors in the cuda tests too on your GPU?

Those tests are included in this branch, right? If so, then I have tested them on the GPU and they work.

Due to the changes to promotion in Numpy 2.x, it gives OverflowError: Python integer 256 out of bounds for uint8. It needs to be explicitly promoted now. I will create a issue for this and fix it separately.

That's very likely; we only saw this error when upgrading to NumPy 2.0. Since I had to get a version of Awkward out with NumPy 2.0 support, I had to drop the tests, but I didn't want them to get forgotten about.

@ManasviGoyal
Copy link
Collaborator Author

Those tests are included in this branch, right? If so, then I have tested them on the GPU and they work.

No, I meant the tests that were removed. As for me those tests were failing only for the Python kernel and not CPU and CUDA kernels.

That's very likely; we only saw this error when upgrading to NumPy 2.0. Since I had to get a version of Awkward out with NumPy 2.0 support, I had to drop the tests, but I didn't want them to get forgotten about.

I have opened up a issue #3071 and self- assigned it. I will fix it in the coming week!

@ManasviGoyal ManasviGoyal merged commit 12a30f4 into main Apr 4, 2024
41 checks passed
@ManasviGoyal ManasviGoyal deleted the ManasviGoyal/cuda-integration-tests branch April 4, 2024 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gpu Concerns the GPU implementation (backend = "cuda')
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants