-
Notifications
You must be signed in to change notification settings - Fork 173
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
cuda.parallel: Forbid non-contiguous arrays as inputs (or outputs) #3233
cuda.parallel: Forbid non-contiguous arrays as inputs (or outputs) #3233
Conversation
🟩 CI finished in 23m 32s: Pass: 100%/1 | Total: 23m 32s | Avg: 23m 32s | Max: 23m 32s
|
Project | |
---|---|
CCCL Infrastructure | |
libcu++ | |
CUB | |
Thrust | |
CUDA Experimental | |
+/- | python |
CCCL C Parallel Library | |
Catch2Helper |
Modifications in project or dependencies?
Project | |
---|---|
CCCL Infrastructure | |
libcu++ | |
CUB | |
Thrust | |
CUDA Experimental | |
+/- | python |
CCCL C Parallel Library | |
Catch2Helper |
🏃 Runner counts (total jobs: 1)
# | Runner |
---|---|
1 | linux-amd64-gpu-v100-latest-1 |
🟥 CI finished in 25m 36s: Pass: 0%/1 | Total: 25m 36s | Avg: 25m 36s | Max: 25m 36s
|
Project | |
---|---|
CCCL Infrastructure | |
libcu++ | |
CUB | |
Thrust | |
CUDA Experimental | |
+/- | python |
CCCL C Parallel Library | |
Catch2Helper |
Modifications in project or dependencies?
Project | |
---|---|
CCCL Infrastructure | |
libcu++ | |
CUB | |
Thrust | |
CUDA Experimental | |
+/- | python |
CCCL C Parallel Library | |
Catch2Helper |
🏃 Runner counts (total jobs: 1)
# | Runner |
---|---|
1 | linux-amd64-gpu-v100-latest-1 |
🟥 CI finished in 24m 57s: Pass: 0%/1 | Total: 24m 57s | Avg: 24m 57s | Max: 24m 57s
|
Project | |
---|---|
CCCL Infrastructure | |
libcu++ | |
CUB | |
Thrust | |
CUDA Experimental | |
+/- | python |
CCCL C Parallel Library | |
Catch2Helper |
Modifications in project or dependencies?
Project | |
---|---|
CCCL Infrastructure | |
libcu++ | |
CUB | |
Thrust | |
CUDA Experimental | |
+/- | python |
CCCL C Parallel Library | |
Catch2Helper |
🏃 Runner counts (total jobs: 1)
# | Runner |
---|---|
1 | linux-amd64-gpu-v100-latest-1 |
3770e06
to
8b1fdd9
Compare
🟩 CI finished in 23m 48s: Pass: 100%/1 | Total: 23m 48s | Avg: 23m 48s | Max: 23m 48s
|
Project | |
---|---|
CCCL Infrastructure | |
libcu++ | |
CUB | |
Thrust | |
CUDA Experimental | |
+/- | python |
CCCL C Parallel Library | |
Catch2Helper |
Modifications in project or dependencies?
Project | |
---|---|
CCCL Infrastructure | |
libcu++ | |
CUB | |
Thrust | |
CUDA Experimental | |
+/- | python |
CCCL C Parallel Library | |
Catch2Helper |
🏃 Runner counts (total jobs: 1)
# | Runner |
---|---|
1 | linux-amd64-gpu-v100-latest-1 |
🟩 CI finished in 23m 45s: Pass: 100%/1 | Total: 23m 45s | Avg: 23m 45s | Max: 23m 45s
|
Project | |
---|---|
CCCL Infrastructure | |
libcu++ | |
CUB | |
Thrust | |
CUDA Experimental | |
+/- | python |
CCCL C Parallel Library | |
Catch2Helper |
Modifications in project or dependencies?
Project | |
---|---|
CCCL Infrastructure | |
libcu++ | |
CUB | |
Thrust | |
CUDA Experimental | |
+/- | python |
CCCL C Parallel Library | |
Catch2Helper |
🏃 Runner counts (total jobs: 1)
# | Runner |
---|---|
1 | linux-amd64-gpu-v100-latest-1 |
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.
LGTM! Sorry for delay in reviews.
if f_contiguous: | ||
try: | ||
return cp.asfortranarray(arr) | ||
except ImportError: # cublas unavailable |
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.
Q: What's the version of CuPy that triggered this? Importing CuPy should not fail due to lack of any CTK library... If so we might have something to fix.
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.
cupy-cuda12x-13.3.0
.
Here's what the failure looks like:
2025-01-03T00:16:23.4239558Z _________________ ERROR at setup of test_reduce_2d_array[True] _________________
2025-01-03T00:16:23.4241093Z
2025-01-03T00:16:23.4242663Z request = <SubRequest 'array_2d' for <Function test_reduce_2d_array[True]>>
2025-01-03T00:16:23.4244087Z
2025-01-03T00:16:23.4245368Z @pytest.fixture(params=[True, False])
2025-01-03T00:16:23.4246832Z def array_2d(request):
2025-01-03T00:16:23.4248065Z f_contiguous = request.param
2025-01-03T00:16:23.4249357Z arr = cp.random.rand(5, 10)
2025-01-03T00:16:23.4250661Z if f_contiguous:
2025-01-03T00:16:23.4252062Z > return cp.asfortranarray(arr)
2025-01-03T00:16:23.4253052Z
2025-01-03T00:16:23.4253482Z tests/test_reduce.py:511:
2025-01-03T00:16:23.4255090Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2025-01-03T00:16:23.4257843Z ../../build/cuda12.6-gcc13/python/cupy/_manipulation/kind.py:62: in asfortranarray
2025-01-03T00:16:23.4259978Z return _core.asfortranarray(a, dtype)
2025-01-03T00:16:23.4261749Z cupy/_core/core.pyx:2766: in cupy._core.core.asfortranarray
2025-01-03T00:16:23.4263333Z ???
2025-01-03T00:16:23.4264614Z cupy/_core/core.pyx:2784: in cupy._core.core.asfortranarray
2025-01-03T00:16:23.4266229Z ???
2025-01-03T00:16:23.4267531Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2025-01-03T00:16:23.4268823Z
2025-01-03T00:16:23.4269155Z > ???
2025-01-03T00:16:23.4270863Z E ImportError: libcublas.so.12: cannot open shared object file: No such file or directory
2025-01-03T00:16:23.4272563Z
2025-01-03T00:16:23.4273016Z cupy/_core/core.pyx:2710: ImportError
cc8a9fa
to
abaa341
Compare
🟩 CI finished in 23m 45s: Pass: 100%/1 | Total: 23m 45s | Avg: 23m 45s | Max: 23m 45s
|
Project | |
---|---|
CCCL Infrastructure | |
libcu++ | |
CUB | |
Thrust | |
CUDA Experimental | |
+/- | python |
CCCL C Parallel Library | |
Catch2Helper |
Modifications in project or dependencies?
Project | |
---|---|
CCCL Infrastructure | |
libcu++ | |
CUB | |
Thrust | |
CUDA Experimental | |
+/- | python |
CCCL C Parallel Library | |
Catch2Helper |
🏃 Runner counts (total jobs: 1)
# | Runner |
---|---|
1 | linux-amd64-gpu-v100-latest-1 |
|
||
d_in = cp.zeros((size, 2))[:, 0] | ||
with pytest.raises(ValueError, match="Non-contiguous arrays are not supported."): | ||
_ = algorithms.reduce_into(d_in, d_out, binary_op, h_init) |
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'm seeing this warning:
=========================================================================== warnings summary ===========================================================================
tests/test_reduce.py::test_reduce_non_contiguous
/home/coder/cccl/python/devenv/lib/python3.12/site-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored in: <function _Reduce.__del__ at 0x7bf123139080>
Traceback (most recent call last):
File "/home/coder/cccl/python/cuda_parallel/cuda/parallel/experimental/algorithms/reduce.py", line 132, in __del__
bindings.cccl_device_reduce_cleanup(ctypes.byref(self.build_result))
^^^^^^^^^^^^^^^^^
AttributeError: '_Reduce' object has no attribute 'build_result'
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================= 1 passed, 93 deselected, 1 warning in 0.44s ==============================================================
I'm working around it like this: bcf0de8
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.
That makes sense - nice catch!
While we're at it, we should probably turn warnings into errors so that we don't let these things slip in the future like I did here. Perhaps we could start with these three lines?
Description
Closes #3223.
Checklist