Skip to content

Commit 677f67e

Browse files
huuanhhuynachirkin
andcommitted
Apply suggestion from @achirkin
Add comment to explain extra debug allocation Co-authored-by: Artem M. Chirkin <9253178+achirkin@users.noreply.github.com>
1 parent 45ce85e commit 677f67e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

cpp/src/neighbors/detail/cagra/cagra_helpers.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ std::tuple<size_t, size_t, size_t, size_t> optimize_workspace_size(size_t n_rows
8686

8787
size_t debug_host_size = 0;
8888
if (raft::default_logger().should_log(rapids_logger::level_enum::debug)) {
89+
// cagra::detail::graph::optimize() allocates extra memory to calculate
90+
// graph metrics when debug logging is enabled
8991
debug_host_size = n_rows * graph_degree * sizeof(uint32_t) // host_copy_output_graph
9092
+ n_rows * sizeof(uint32_t) // in_edge_count
9193
+ graph_degree * sizeof(uint32_t); // hist

0 commit comments

Comments
 (0)