Replace hash join internals with HashCSR - #23640
Draft
PointKernel wants to merge 15 commits into
Draft
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. |
Member
Author
|
Performance results: |
rootjalex
reviewed
Aug 12, 2026
Comment on lines
+52
to
+53
| auto const rank = slot_count_ref.fetch_add(size_type{1}, cuda::memory_order_relaxed); | ||
| build_positions[index] = {slot, rank}; |
There was a problem hiding this comment.
This, storing rank AOT, is a nice optimization the original implementation did not have! :)
rootjalex
reviewed
Aug 12, 2026
| probe_slots[index] = found ? static_cast<size_type>(slot) : CUDF_SIZE_TYPE_SENTINEL; | ||
| } | ||
| if (match_counts != nullptr) { | ||
| match_counts[index] = IsOuter ? cuda::std::max(count, size_type{1}) : count; |
There was a problem hiding this comment.
I think this should be IsOuterOrLeft ?
rootjalex
reviewed
Aug 12, 2026
Comment on lines
+103
to
+112
| if (found && matched_slots != nullptr) { | ||
| auto matched_slot_ref = | ||
| cuda::atomic_ref<std::uint32_t, cuda::thread_scope_device>{matched_slots[slot]}; | ||
| auto expected = std::uint32_t{0}; | ||
| if (matched_slot_ref.compare_exchange_strong( | ||
| expected, std::uint32_t{1}, cuda::memory_order_relaxed)) { | ||
| cuda::atomic_ref<unsigned long long, cuda::thread_scope_device>{*matched_build_rows} | ||
| .fetch_add(static_cast<unsigned long long>(count), cuda::memory_order_relaxed); | ||
| } | ||
| } |
There was a problem hiding this comment.
I'm a bit confused by this. Some comments could help with it. Is this implementing the right/outer join matching array we discussed?
rootjalex
reviewed
Aug 12, 2026
| } | ||
|
|
||
| template <bool IsOuter> | ||
| CUDF_KERNEL void hash_csr_retrieve_kernel(std::int64_t output_size, |
There was a problem hiding this comment.
I don't see the logic for handling right/outer joins emission here. Is the IsOuter flag only for left joins for now?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
TBD
Following the design proposed by @rootjalex
Checklist