Skip to content

Commit

Permalink
Use the pooled allocator helper
Browse files Browse the repository at this point in the history
  • Loading branch information
achirkin committed Mar 11, 2022
1 parent a71fa4b commit 02dcaec
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions cpp/bench/spatial/selection.cu
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ struct selection : public fixture {

void run_benchmark(::benchmark::State& state) override
{
rmm::mr::cuda_memory_resource cuda_mr;
rmm::mr::pool_memory_resource<rmm::mr::cuda_memory_resource> pool_mr{
&cuda_mr, size_t(1) << size_t(30), size_t(16) << size_t(30)};
rmm::mr::set_current_device_resource(&pool_mr);
using_pool_memory_res res;
try {
std::ostringstream label_stream;
label_stream << params_.n_inputs << "#" << params_.input_len << "#" << params_.k;
Expand All @@ -71,7 +68,6 @@ struct selection : public fixture {
} catch (raft::exception& e) {
state.SkipWithError(e.what());
}
rmm::mr::set_current_device_resource(nullptr);
}

private:
Expand Down

0 comments on commit 02dcaec

Please sign in to comment.