Skip to content

Commit

Permalink
Don't use user resource for a temporary allocation in sort_by_key (#7431
Browse files Browse the repository at this point in the history
)

This simple PR is to make `sort_by_key` not use the user resource for the temporarily allocated `sorted_order`.

Authors:
  - Wonchan Lee (@magnatelee)

Approvers:
  - Jake Hemstad (@jrhemstad)
  - Vukasin Milovanovic (@vuule)

URL: #7431
  • Loading branch information
magnatelee authored Feb 24, 2021
1 parent 2234554 commit 9c3a908
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpp/src/sort/sort.cu
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ std::unique_ptr<table> sort_by_key(table_view const& values,
CUDF_EXPECTS(values.num_rows() == keys.num_rows(),
"Mismatch in number of rows for values and keys");

auto sorted_order = detail::sorted_order(keys, column_order, null_precedence, stream, mr);
auto sorted_order = detail::sorted_order(
keys, column_order, null_precedence, stream, rmm::mr::get_current_device_resource());

return detail::gather(values,
sorted_order->view(),
Expand Down

0 comments on commit 9c3a908

Please sign in to comment.