-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[MINOR] Route leftover temps through local temp_mr
#23730
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
Changes from all commits
327bbd9
27b9887
586870c
12da70b
e27879a
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 |
|---|---|---|
|
|
@@ -70,7 +70,7 @@ rmm::device_uvector<size_type> sorted_dense_rank(column_view input_col, | |
| rmm::device_uvector<size_type> dense_rank_sorted(input_size, stream); | ||
|
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. [Optional] Should this also use
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.
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. It's the return value of this (helper) function, but the output (of |
||
|
|
||
| auto const comparator_helper = [&](auto const device_comparator) { | ||
| thrust::transform(rmm::exec_policy_nosync(stream, cudf::get_current_device_resource_ref()), | ||
| thrust::transform(rmm::exec_policy_nosync(stream, temp_mr), | ||
| cuda::counting_iterator<cudf::size_type>{0}, | ||
| cuda::counting_iterator{input_size}, | ||
| dense_rank_sorted.data(), | ||
|
|
@@ -88,7 +88,7 @@ rmm::device_uvector<size_type> sorted_dense_rank(column_view input_col, | |
| comparator_helper(device_comparator); | ||
| } | ||
|
|
||
| thrust::inclusive_scan(rmm::exec_policy_nosync(stream, cudf::get_current_device_resource_ref()), | ||
| thrust::inclusive_scan(rmm::exec_policy_nosync(stream, temp_mr), | ||
| dense_rank_sorted.begin(), | ||
| dense_rank_sorted.end(), | ||
| dense_rank_sorted.data()); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -410,8 +410,6 @@ TYPED_TEST(FixedWidthColumnWrapperTest, NullablePairListConstructorAllNullMatch) | |
| this->resources()); | ||
| cudf::column_view view = col; | ||
|
|
||
| // TODO: has_nonempty_nulls (via count_if/transform_reduce) still allocates temporaries from the | ||
| // current device resource for strings columns. | ||
|
Comment on lines
-413
to
-414
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. So does this mean we can now add
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. Yes, fixed width types should work without a problem. Strings and lists were the problematic types.
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. Ok, so let's add the assertion here to give the test some teeth? |
||
| CUDF_TEST_EXPECT_COLUMNS_EQUAL(view, | ||
| match_view, | ||
| cudf::test::debug_output_level::FIRST_ERROR, | ||
|
|
@@ -517,8 +515,9 @@ TYPED_TEST(StringsColumnWrapperTest, NullablePairListConstructorAllNullMatch) | |
| this->resources()); | ||
| cudf::column_view view = col; | ||
|
|
||
| // TODO: has_nonempty_nulls (via count_if/transform_reduce) still allocates temporaries from the | ||
| // current device resource for strings columns. | ||
| // TODO: check_non_empty_nulls (via has_nonempty_nulls) still allocates temporaries from the | ||
|
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. Your original phrasing pointed at The above brings up another minor inaccuracy in my earlier suggested wording: simply accepting a memory resource in
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. Sorry, the actual requests might've gotten lost in the above wall of text. Should we (a) add a TODO in |
||
| // current device resource for string columns. Once it accepts a memory resource, guard this | ||
| // comparison with fail_on_current_device_resource_use(). | ||
| CUDF_TEST_EXPECT_COLUMNS_EQUAL(view, | ||
| match_view, | ||
| cudf::test::debug_output_level::FIRST_ERROR, | ||
|
|
||
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.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: NVIDIA/cudf
Length of output: 40168
🏁 Script executed:
Repository: NVIDIA/cudf
Length of output: 40927
🏁 Script executed:
Repository: NVIDIA/cudf
Length of output: 35841
🏁 Script executed:
Repository: NVIDIA/cudf
Length of output: 6498
Add a resource-separation regression test.
When
null_contribution > 0,mark_join::mark_probe_and_retrievereachesthrust::copy_if. The current tests use the same resource for temporary and output allocations, so they do not detect a regression in this resource contract. Add a null-equality-unequal anti-join test with distinct tracking resources and verify both allocation paths.🤖 Prompt for AI Agents
Source: Coding guidelines