[FEA]: Validate cuda.parallel type matching in build and execution#2429
[FEA]: Validate cuda.parallel type matching in build and execution#2429gevtushenko merged 17 commits intoNVIDIA:mainfrom
Conversation
🟨 CI finished in 6h 01m: Pass: 97%/437 | Total: 2d 12h | Avg: 8m 18s | Max: 1h 27m | Hits: 99%/41645
|
| Project | |
|---|---|
| +/- | CCCL Infrastructure |
| libcu++ | |
| CUB | |
| Thrust | |
| CUDA Experimental | |
| pycuda | |
| CUDA C Core Library |
Modifications in project or dependencies?
| Project | |
|---|---|
| +/- | CCCL Infrastructure |
| +/- | libcu++ |
| +/- | CUB |
| +/- | Thrust |
| +/- | CUDA Experimental |
| +/- | pycuda |
| +/- | CUDA C Core Library |
🏃 Runner counts (total jobs: 437)
| # | Runner |
|---|---|
| 320 | linux-amd64-cpu16 |
| 66 | linux-amd64-gpu-v100-latest-1 |
| 28 | linux-arm64-cpu16 |
| 23 | windows-amd64-cpu16 |
That might conflict with the host standard library
…imental/__init__.py and fix bug in python/cuda_parallel/tests/test_reduce_api.py
🟩 CI finished in 1h 15m: Pass: 100%/368 | Total: 1d 11h | Avg: 5m 42s | Max: 1h 06m | Hits: 99%/25663
|
| Project | |
|---|---|
| +/- | CCCL Infrastructure |
| libcu++ | |
| CUB | |
| Thrust | |
| CUDA Experimental | |
| pycuda | |
| CUDA C Core Library |
Modifications in project or dependencies?
| Project | |
|---|---|
| +/- | CCCL Infrastructure |
| +/- | libcu++ |
| +/- | CUB |
| +/- | Thrust |
| +/- | CUDA Experimental |
| +/- | pycuda |
| +/- | CUDA C Core Library |
🏃 Runner counts (total jobs: 368)
| # | Runner |
|---|---|
| 297 | linux-amd64-cpu16 |
| 28 | linux-amd64-gpu-v100-latest-1 |
| 28 | linux-arm64-cpu16 |
| 15 | windows-amd64-cpu16 |
|
Hi @gevtushenko, I think I addressed what we discussed this morning, although I'm not sure: is there anything else you want me to add to this PR? |
🟩 CI finished in 1h 00m: Pass: 100%/368 | Total: 1d 21h | Avg: 7m 23s | Max: 42m 53s | Hits: 81%/25679
|
| Project | |
|---|---|
| +/- | CCCL Infrastructure |
| libcu++ | |
| CUB | |
| Thrust | |
| CUDA Experimental | |
| pycuda | |
| CUDA C Core Library |
Modifications in project or dependencies?
| Project | |
|---|---|
| +/- | CCCL Infrastructure |
| +/- | libcu++ |
| +/- | CUB |
| +/- | Thrust |
| +/- | CUDA Experimental |
| +/- | pycuda |
| +/- | CUDA C Core Library |
🏃 Runner counts (total jobs: 368)
| # | Runner |
|---|---|
| 297 | linux-amd64-cpu16 |
| 28 | linux-amd64-gpu-v100-latest-1 |
| 28 | linux-arm64-cpu16 |
| 15 | windows-amd64-cpu16 |
| # example-begin reduce-min | ||
| def min_op(a, b): | ||
| return a if a < b else b | ||
| # example-end reduce-min |
There was a problem hiding this comment.
important: the test_*_api files are used for documentation purposes. They illustrate usage of API. Sphinx essentially copy-pastes code between the example-begin reduce-min and example-begin reduce-min labels. Here's an example how it looked like. This cange makes it so that our reference API documentation only contains min_op definition. Let's revert this change.
There was a problem hiding this comment.
Done. Thanks for the explanation!
I only kept some minor changes.
| def test_device_reduce_dtype_mismatch(): | ||
| dtypes = [numpy.int32, numpy.int64] | ||
| h_inits = [numpy.array([], dt) for dt in dtypes] | ||
| h_inputs = [numpy.array([], dt) for dt in dtypes] | ||
| d_outputs = [cuda.device_array(1, dt) for dt in dtypes] | ||
| d_inputs = [cuda.to_device(h_inp) for h_inp in h_inputs] | ||
|
|
||
| reduce_into = cudax.reduce_into(d_inputs[0], d_outputs[0], min_op, h_inits[0]) | ||
|
|
||
| for ix in range(3): | ||
| with pytest.raises(TypeError, match=r"dtype mismatch: __init__=int32, __call__=int64"): | ||
| reduce_into(None, d_inputs[int(ix == 0)], d_outputs[int(ix == 1)], h_inits[int(ix == 2)]) |
There was a problem hiding this comment.
important: this file's purpose is testing code snippets in our docs. Let's put functionality tests into test_reduce.py.
|
Interesting, so this is akin to the builder/executor distinction in nvmath-python's stateful APIs, where a similar check also exists: |
…phinx documentation. Also fix existing typo.
|
I was looking for some way to assert that what's passed to cccl/python/cuda_parallel/cuda/parallel/experimental/__init__.py Lines 101 to 110 in 1cfe171
I figure I have to get into that code when I make |
🟩 CI finished in 1h 13m: Pass: 100%/370 | Total: 1d 15h | Avg: 6m 19s | Max: 35m 40s | Hits: 99%/25712
|
| Project | |
|---|---|
| +/- | CCCL Infrastructure |
| libcu++ | |
| CUB | |
| Thrust | |
| CUDA Experimental | |
| pycuda | |
| CUDA C Core Library |
Modifications in project or dependencies?
| Project | |
|---|---|
| +/- | CCCL Infrastructure |
| +/- | libcu++ |
| +/- | CUB |
| +/- | Thrust |
| +/- | CUDA Experimental |
| +/- | pycuda |
| +/- | CUDA C Core Library |
🏃 Runner counts (total jobs: 370)
| # | Runner |
|---|---|
| 297 | linux-amd64-cpu16 |
| 30 | linux-amd64-gpu-v100-latest-1 |
| 28 | linux-arm64-cpu16 |
| 15 | windows-amd64-cpu16 |
Description
Closes: #2416
Checklist