Skip to content

Commit

Permalink
Remove RAFT memory management (rapidsai#4468)
Browse files Browse the repository at this point in the history
Completes rapidsai/raft#400

Authors:
  - Victor Lafargue (https://github.com/viclafargue)

Approvers:
  - Corey J. Nolet (https://github.com/cjnolet)

URL: rapidsai#4468
  • Loading branch information
viclafargue authored Jan 18, 2022
1 parent 71f50a0 commit 88d0e42
Show file tree
Hide file tree
Showing 27 changed files with 1,893 additions and 2,012 deletions.
7 changes: 4 additions & 3 deletions cpp/examples/symreg/symreg_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ int main(int argc, char* argv[])
dw_test.data(), w_test.data(), sizeof(float) * n_test_rows, cudaMemcpyHostToDevice, stream));

// Initialize AST
raft::allocate(d_finalprogs, params.population_size, stream);
auto curr_mr = rmm::mr::get_current_device_resource();
d_finalprogs = static_cast<cg::program_t>(curr_mr->allocate(params.population_size, stream));

std::vector<std::vector<cg::program>> history;
history.reserve(params.generations);
Expand Down Expand Up @@ -337,8 +338,8 @@ int main(int argc, char* argv[])

/* ======================= Reset data ======================= */

raft::deallocate(d_finalprogs, stream);
curr_mr->deallocate(d_finalprogs, params.population_size, stream);
CUDA_RT_CALL(cudaEventDestroy(start));
CUDA_RT_CALL(cudaEventDestroy(stop));
return 0;
}
}
Loading

0 comments on commit 88d0e42

Please sign in to comment.