-
Notifications
You must be signed in to change notification settings - Fork 376
Replace thrust::discard_iterator with cuda::discard_iterator #8276
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
base: main
Are you sure you want to change the base?
Changes from all commits
1b913c9
6636949
6845498
06c787a
822f769
034f5e0
9460495
8832ccf
a375276
906be40
c3fedf1
4487121
4dc713b
5377ca2
d3686ef
f391578
7a784d6
a07b14d
77259a0
bc037d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,7 @@ | |
| #include <cub/device/dispatch/kernels/scan_warpspeed_policy.cuh> | ||
| #include <cub/thread/thread_reduce.cuh> | ||
| #include <cub/thread/thread_scan.cuh> | ||
| #include <cub/util_type.cuh> | ||
| #include <cub/warp/warp_reduce.cuh> | ||
| #include <cub/warp/warp_scan.cuh> | ||
|
|
||
|
|
@@ -935,8 +936,8 @@ _CCCL_API constexpr bool use_warpspeed( | |
| template <typename InputIteratorT, typename OutputIteratorT, typename AccumT> | ||
| _CCCL_API constexpr bool use_warpspeed(const scan_warpspeed_policy& policy) | ||
| { | ||
| using InputT = it_value_t<InputIteratorT>; | ||
| using OutputT = it_value_t<OutputIteratorT>; | ||
| using InputT = non_void_value_t<InputIteratorT, it_value_t<OutputIteratorT>>; | ||
| using OutputT = non_void_value_t<OutputIteratorT, it_value_t<InputIteratorT>>; | ||
|
Comment on lines
+939
to
+940
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| return use_warpspeed( | ||
| policy, | ||
| static_cast<int>(sizeof(InputT)), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -92,7 +92,7 @@ TEST_CASE("Test nvrtc", "[test][nvrtc]") | |
| #include <thrust/iterator/constant_iterator.h> | ||
| #include <thrust/iterator/counting_iterator.h> | ||
| #include <thrust/iterator/discard_iterator.h> | ||
| #include <cuda/iterator> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Important: Please revert. We want to continue to test the old iterator with NVRTC. |
||
| #include <thrust/iterator/permutation_iterator.h> | ||
| #include <thrust/iterator/reverse_iterator.h> | ||
| #include <thrust/iterator/tabulate_output_iterator.h> | ||
|
|
||
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 is a change in semantics, why is this necessary?
See:
cccl/cub/cub/util_type.cuh
Lines 54 to 69 in 0969ad0
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.
See the other comment. There is a change in
value_typebetween the iterators which is not handled by CUB.