-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patch CUB DeviceSegmentedSort and remove workaround (#12234)
Fix in CUB DeviceSegmentedSort allows for workaround to removed. The CUB fix is applied as a patch in the libcudf build process. Reference NVIDIA/cub#594 and #12217 Authors: - David Wendt (https://github.com/davidwendt) Approvers: - Elias Stehle (https://github.com/elstehle) - Robert Maynard (https://github.com/robertmaynard) URL: #12234
- Loading branch information
1 parent
3bf6d1d
commit 2a5411a
Showing
3 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
cpp/cmake/thirdparty/patches/cub_segmented_sort_with_bool_key.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/dependencies/cub/cub/agent/agent_sub_warp_merge_sort.cuh b/dependencies/cub/cub/agent/agent_sub_warp_merge_sort.cuh | ||
index ad65f2a3..ad45a21e 100644 | ||
--- a/dependencies/cub/cub/agent/agent_sub_warp_merge_sort.cuh | ||
+++ b/dependencies/cub/cub/agent/agent_sub_warp_merge_sort.cuh | ||
@@ -221,7 +221,8 @@ public: | ||
using UnsignedBitsT = typename Traits<KeyT>::UnsignedBits; | ||
UnsignedBitsT default_key_bits = IS_DESCENDING ? Traits<KeyT>::LOWEST_KEY | ||
: Traits<KeyT>::MAX_KEY; | ||
- KeyT oob_default = reinterpret_cast<KeyT &>(default_key_bits); | ||
+ KeyT oob_default = std::is_same_v<KeyT, bool> ? !IS_DESCENDING | ||
+ : reinterpret_cast<KeyT &>(default_key_bits); | ||
|
||
WarpLoadKeysT(storage.load_keys) | ||
.Load(keys_input, keys, segment_size, oob_default); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters