Replace thrust::discard_iterator with cuda::discard_iterator#8276
Replace thrust::discard_iterator with cuda::discard_iterator#8276Jacobfaib wants to merge 20 commits intoNVIDIA:mainfrom
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
/ok to test |
1 similar comment
|
/ok to test |
|
/ok to test |
3 similar comments
|
/ok to test |
|
/ok to test |
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
|
/ok to test |
2102745 to
3e05e79
Compare
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
|
/ok to test |
1 similar comment
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
|
/ok to test |
1 similar comment
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
f39b18b to
f391578
Compare
|
/ok to test |
|
/ok to test |
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
|
/ok to test |
😬 CI Workflow Results🟥 Finished in 2h 48m: Pass: 96%/375 | Total: 13d 09h | Max: 2h 44m | Hits: 80%/526850See results here. |
| static_assert(::cuda::std::is_invocable_v<Generator>, "The passed generator must be a nullary function object"); | ||
| static_assert( | ||
| ::cuda::std::is_assignable_v<detail::it_reference_t<RandomAccessIteratorOut>, | ||
| ::cuda::std::is_assignable_v<::cuda::std::iter_reference_t<RandomAccessIteratorOut>, |
There was a problem hiding this comment.
There was a problem hiding this comment.
See the other comment. There is a change in value_type between the iterators which is not handled by CUB.
| #include <thrust/iterator/constant_iterator.h> | ||
| #include <thrust/iterator/counting_iterator.h> | ||
| #include <thrust/iterator/discard_iterator.h> | ||
| #include <cuda/iterator> |
There was a problem hiding this comment.
Important: Please revert. We want to continue to test the old iterator with NVRTC.
| using InputT = non_void_value_t<InputIteratorT, it_value_t<OutputIteratorT>>; | ||
| using OutputT = non_void_value_t<OutputIteratorT, it_value_t<InputIteratorT>>; |
There was a problem hiding this comment.
Important: This is probably wrong, since we cannot just take the traits of the input type in case we have no output type.
Why is this necessary? Which test is failing?
There was a problem hiding this comment.
cuda::discard_iterator::value_type is void, while thrust::discard_iterator::value_type is not. Many CUB algorithms seemingly don't handle this properly and/or had special handling for thrust::discard_iterator (or other proxy iterators) and so failed to compile with the new discard iterator.
Description
Replaces
thrust::discard_iteratorwithcuda::discard_iteratorChecklist