-
Notifications
You must be signed in to change notification settings - Fork 188
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
Add assertions in the mdspan accessors that we are not out of bounds #3055
Conversation
While we are at it drop some of the custom macros and use the proper CCCL ones. Also slap nodiscard on all the APIs
775e706
to
6eb0f2b
Compare
🟩 CI finished in 2h 51m: Pass: 100%/396 | Total: 6d 12h | Avg: 23m 39s | Max: 1h 24m | Hits: 85%/22125
|
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: 396)
# | Runner |
---|---|
327 | linux-amd64-cpu16 |
28 | linux-arm64-cpu16 |
26 | linux-amd64-gpu-v100-latest-1 |
15 | windows-amd64-cpu16 |
@@ -77,7 +77,7 @@ | |||
|
|||
_LIBCUDACXX_BEGIN_NAMESPACE_STD | |||
|
|||
#if _CCCL_STD_VER > 2011 | |||
#if _CCCL_STD_VER >= 2014 |
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.
Remark: we report c++17 for mdspan
support in the docs
{ | ||
return __self.__accessor_ref().access(__self.__ptr_ref(), __self.__mapping_ref()(__indices[_Idxs]...)); | ||
const index_type __res = __self.__mapping_ref()(__indices[_Idxs]...); | ||
_CCCL_ASSERT(__res < __self.__mapping_ref().required_span_size(), "cuda::std::mdspan subscript out of range!"); |
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.
Important: this check is too weak. We should check out-of-bound accesses for each dimension and not globally.
…VIDIA#3055) While we are at it drop some of the custom macros and use the proper CCCL ones. Also slap nodiscard on all the APIs Try to avoid pointless comparison warnings
While we are at it drop some of the custom macros and use the proper CCCL ones.
Also slap nodiscard on all the APIs
Fixes #3045