Repository navigation
Dropped duplicated math function from Thrust - #6188
Conversation
bernhardmgruber
left a comment
There was a problem hiding this comment.
Please remove
#include <thrust/detail/integer_math.h>from files where we no longer need it.
miscco
left a comment
There was a problem hiding this comment.
Thanks a lot for working on this issue. It is already looking great.
I found one incorrect replacement and some potential conversion issues
|
@bernhardmgruber @miscco all changes that you guys suggested is done, lmk if there are more Changes. :) |
|
@viralbhadeshiya This looks great 🎉 Thanks a lot for working on this. I added a few minor changes:
|
|
/ok to test 07b811c |
This comment has been minimized.
This comment has been minimized.
|
/ok to test 34fc385 |
This comment has been minimized.
This comment has been minimized.
|
@fbusato There is an issue with I suspect there is a differing behavior for |
|
This causes a different behavior in |
|
@viralbhadeshiya my suggestion is just to add the condition |
@fbusato would this similar changes also required in |
|
yes, but I'm not sure that this edge case is evaluated in the test case. You can also run the test locally to make sure it works |
Okay made changes, unfortunately my remote server which had NVIDIA device is facing some issue so could not run tests. but changes are done. |
|
/ok to test 0ab0b72 |
🥳 CI Workflow Results🟩 Finished in 4h 29m: Pass: 100%/118 | Total: 3d 10h | Max: 4h 28m | Hits: 90%/166971See results here. |
…tion from Thrust (NVIDIA/cccl#6188) Upstream: NVIDIA/cccl@5303f65 Partial: upstream deletes thrust/detail/integer_math.h and switches execute_with_allocator.h / mr/{pool,disjoint_pool,pool_options}.h to ::cuda::ceil_div / ceil_ilog2 / is_power_of_two. Kept integer_math.h and the thrust::detail helpers in generic headers for compatibility (those ::cuda:: cmath utilities are unavailable without libhipcxx; behaviour is identical). system/cuda: dropped the now-redundant integer_math.h include from scan.h/sort.h (is_negative still reaches scan.h via dispatch.h); cuda dispatch.h keeps including integer_math.h instead of defining its own is_negative, which would collide with integer_math.h's overloads. HIP: no change (hip dispatch.h still uses thrust::detail::is_negative from integer_math.h). test/: no counterpart. testing/: no counterpart. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
…function from Thrust (NVIDIA/cccl#6188) Upstream: NVIDIA/cccl@5303f65 Completes the earlier partial port. libhipcxx is now mandatory (libcxx.h requires >= 3.4), so the compatibility reason for keeping thrust::detail integer helpers no longer applies: - delete thrust/detail/integer_math.h. - execute_with_allocator.h: divide_ri -> _THRUST_LIBCXX::ceil_div. - mr/{pool,disjoint_pool}.h: log2_ri -> _THRUST_LIBCXX::ceil_ilog2, is_power_of_2 -> _THRUST_LIBCXX::is_power_of_two. - mr/pool_options.h: validate() uses is_power_of_two with the upstream explicit != 0 checks. - system/cuda/detail/dispatch.h: take upstream (defines its own thrust::detail::is_negative). - system/hip/detail/dispatch.h: same is_negative, spelled with _THRUST_STD/THRUST_HOST_DEVICE; hip scan.h/sort.h drop the integer_math.h include. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
…tion from Thrust (NVIDIA/cccl#6188) Upstream: NVIDIA/cccl@5303f65 Partial: upstream deletes thrust/detail/integer_math.h and switches execute_with_allocator.h / mr/{pool,disjoint_pool,pool_options}.h to ::cuda::ceil_div / ceil_ilog2 / is_power_of_two. Kept integer_math.h and the thrust::detail helpers in generic headers for compatibility (those ::cuda:: cmath utilities are unavailable without libhipcxx; behaviour is identical). system/cuda: dropped the now-redundant integer_math.h include from scan.h/sort.h (is_negative still reaches scan.h via dispatch.h); cuda dispatch.h keeps including integer_math.h instead of defining its own is_negative, which would collide with integer_math.h's overloads. HIP: no change (hip dispatch.h still uses thrust::detail::is_negative from integer_math.h). test/: no counterpart. testing/: no counterpart. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
…tion from Thrust (NVIDIA/cccl#6188) Upstream: NVIDIA/cccl@5303f65 Partial: upstream deletes thrust/detail/integer_math.h and switches execute_with_allocator.h / mr/{pool,disjoint_pool,pool_options}.h to ::cuda::ceil_div / ceil_ilog2 / is_power_of_two. Kept integer_math.h and the thrust::detail helpers in generic headers for compatibility (those ::cuda:: cmath utilities are unavailable without libhipcxx; behaviour is identical). system/cuda: dropped the now-redundant integer_math.h include from scan.h/sort.h (is_negative still reaches scan.h via dispatch.h); cuda dispatch.h keeps including integer_math.h instead of defining its own is_negative, which would collide with integer_math.h's overloads. HIP: no change (hip dispatch.h still uses thrust::detail::is_negative from integer_math.h). test/: no counterpart. testing/: no counterpart. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
…function from Thrust (NVIDIA/cccl#6188) Upstream: NVIDIA/cccl@5303f65 Completes the earlier partial port. libhipcxx is now mandatory (libcxx.h requires >= 3.4), so the compatibility reason for keeping thrust::detail integer helpers no longer applies: - delete thrust/detail/integer_math.h. - execute_with_allocator.h: divide_ri -> _THRUST_LIBCXX::ceil_div. - mr/{pool,disjoint_pool}.h: log2_ri -> _THRUST_LIBCXX::ceil_ilog2, is_power_of_2 -> _THRUST_LIBCXX::is_power_of_two. - mr/pool_options.h: validate() uses is_power_of_two with the upstream explicit != 0 checks. - system/cuda/detail/dispatch.h: take upstream (defines its own thrust::detail::is_negative). - system/hip/detail/dispatch.h: same is_negative, spelled with _THRUST_STD/THRUST_HOST_DEVICE; hip scan.h/sort.h drop the integer_math.h include. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
…tion from Thrust (NVIDIA/cccl#6188) Upstream: NVIDIA/cccl@5303f65 Partial: upstream deletes thrust/detail/integer_math.h and switches execute_with_allocator.h / mr/{pool,disjoint_pool,pool_options}.h to ::cuda::ceil_div / ceil_ilog2 / is_power_of_two. Kept integer_math.h and the thrust::detail helpers in generic headers for compatibility (those ::cuda:: cmath utilities are unavailable without libhipcxx; behaviour is identical). system/cuda: dropped the now-redundant integer_math.h include from scan.h/sort.h (is_negative still reaches scan.h via dispatch.h); cuda dispatch.h keeps including integer_math.h instead of defining its own is_negative, which would collide with integer_math.h's overloads. HIP: no change (hip dispatch.h still uses thrust::detail::is_negative from integer_math.h). test/: no counterpart. testing/: no counterpart. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
…tion from Thrust (NVIDIA/cccl#6188) Upstream: NVIDIA/cccl@5303f65 Partial: upstream deletes thrust/detail/integer_math.h and switches execute_with_allocator.h / mr/{pool,disjoint_pool,pool_options}.h to ::cuda::ceil_div / ceil_ilog2 / is_power_of_two. Kept integer_math.h and the thrust::detail helpers in generic headers for compatibility (those ::cuda:: cmath utilities are unavailable without libhipcxx; behaviour is identical). system/cuda: dropped the now-redundant integer_math.h include from scan.h/sort.h (is_negative still reaches scan.h via dispatch.h); cuda dispatch.h keeps including integer_math.h instead of defining its own is_negative, which would collide with integer_math.h's overloads. HIP: no change (hip dispatch.h still uses thrust::detail::is_negative from integer_math.h). test/: no counterpart. testing/: no counterpart. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
…function from Thrust (NVIDIA/cccl#6188) Upstream: NVIDIA/cccl@5303f65 Completes the earlier partial port. libhipcxx is now mandatory (libcxx.h requires >= 3.4), so the compatibility reason for keeping thrust::detail integer helpers no longer applies: - delete thrust/detail/integer_math.h. - execute_with_allocator.h: divide_ri -> _THRUST_LIBCXX::ceil_div. - mr/{pool,disjoint_pool}.h: log2_ri -> _THRUST_LIBCXX::ceil_ilog2, is_power_of_2 -> _THRUST_LIBCXX::is_power_of_two. - mr/pool_options.h: validate() uses is_power_of_two with the upstream explicit != 0 checks. - system/cuda/detail/dispatch.h: take upstream (defines its own thrust::detail::is_negative). - system/hip/detail/dispatch.h: same is_negative, spelled with _THRUST_STD/THRUST_HOST_DEVICE; hip scan.h/sort.h drop the integer_math.h include. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
Description
closes #6104
Checklist