From 31ed9fd1eab1b2d4a5d0a839357ed53530daea97 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Tue, 2 Jul 2024 13:07:36 -0500 Subject: [PATCH] Use provided memory resource for allocating mixed join results. (#16153) This PR fixes a few places where certain code paths for mixed joins are not using the user-provided memory resource. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Mark Harris (https://github.com/harrism) - David Wendt (https://github.com/davidwendt) URL: https://github.com/rapidsai/cudf/pull/16153 --- cpp/src/join/mixed_join.cu | 7 ++----- cpp/src/join/mixed_join_semi.cu | 4 +--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/cpp/src/join/mixed_join.cu b/cpp/src/join/mixed_join.cu index 42e0e4f45ee..90748e6f322 100644 --- a/cpp/src/join/mixed_join.cu +++ b/cpp/src/join/mixed_join.cu @@ -82,9 +82,7 @@ mixed_join( // Left and full joins all return all the row indices from // left with a corresponding NULL from the right. case join_kind::LEFT_JOIN: - case join_kind::FULL_JOIN: - return get_trivial_left_join_indices( - left_conditional, stream, rmm::mr::get_current_device_resource()); + case join_kind::FULL_JOIN: return get_trivial_left_join_indices(left_conditional, stream, mr); // Inner joins return empty output because no matches can exist. case join_kind::INNER_JOIN: return std::pair(std::make_unique>(0, stream, mr), @@ -100,8 +98,7 @@ mixed_join( std::make_unique>(0, stream, mr)); // Full joins need to return the trivial complement. case join_kind::FULL_JOIN: { - auto ret_flipped = get_trivial_left_join_indices( - right_conditional, stream, rmm::mr::get_current_device_resource()); + auto ret_flipped = get_trivial_left_join_indices(right_conditional, stream, mr); return std::pair(std::move(ret_flipped.second), std::move(ret_flipped.first)); } default: CUDF_FAIL("Invalid join kind."); break; diff --git a/cpp/src/join/mixed_join_semi.cu b/cpp/src/join/mixed_join_semi.cu index 8500b248fcf..c147ea3c253 100644 --- a/cpp/src/join/mixed_join_semi.cu +++ b/cpp/src/join/mixed_join_semi.cu @@ -117,9 +117,7 @@ std::unique_ptr> mixed_join_semi( // Anti and semi return all the row indices from left // with a corresponding NULL from the right. case join_kind::LEFT_ANTI_JOIN: - return get_trivial_left_join_indices( - left_conditional, stream, rmm::mr::get_current_device_resource()) - .first; + return get_trivial_left_join_indices(left_conditional, stream, mr).first; // Inner and left semi joins return empty output because no matches can exist. case join_kind::LEFT_SEMI_JOIN: return std::make_unique>(0, stream, mr);