From d63be9a4053da0fff8bbb63f531f15eb282be49d Mon Sep 17 00:00:00 2001 From: Chuck Hastings Date: Thu, 20 Oct 2022 20:22:40 -0400 Subject: [PATCH 1/2] fix memory leak --- cpp/src/c_api/uniform_neighbor_sampling.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/src/c_api/uniform_neighbor_sampling.cpp b/cpp/src/c_api/uniform_neighbor_sampling.cpp index 9c194e515a8..6ebf81a8381 100644 --- a/cpp/src/c_api/uniform_neighbor_sampling.cpp +++ b/cpp/src/c_api/uniform_neighbor_sampling.cpp @@ -310,5 +310,6 @@ extern "C" void cugraph_sample_result_free(cugraph_sample_result_t* result) delete internal_pointer->label_; delete internal_pointer->index_; delete internal_pointer->count_; + delete internal_pointer->experimental_count_; delete internal_pointer; } From 7a6c1d5c22309b23a1e2b194a861166a6c56485b Mon Sep 17 00:00:00 2001 From: Chuck Hastings Date: Thu, 20 Oct 2022 20:27:49 -0400 Subject: [PATCH 2/2] uncomment check for memory leak --- .../pylibcugraph/tests/test_neighborhood_sampling.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/python/pylibcugraph/pylibcugraph/tests/test_neighborhood_sampling.py b/python/pylibcugraph/pylibcugraph/tests/test_neighborhood_sampling.py index 2aedc8fb02a..dd165a1f01b 100644 --- a/python/pylibcugraph/pylibcugraph/tests/test_neighborhood_sampling.py +++ b/python/pylibcugraph/pylibcugraph/tests/test_neighborhood_sampling.py @@ -248,11 +248,7 @@ def test_neighborhood_sampling_large_sg_graph(gpubenchmark): expected_delta = free_memory_before - free_before_cleanup leak = expected_delta - actual_delta print(f" {result_size=} {actual_delta=} {expected_delta=} {leak=}") - # FIXME: this assertion is commented out until the memory leak is - # found. This should be the only failing assertion, so commenting it out - # will allow CI to make any other failures more noticeable. - # - # assert free_memory_before == device.mem_info[0] + assert free_memory_before == device.mem_info[0] def test_sample_result():