From 9a5ebb96994cf62b7dce157a39a1d73488440264 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Mon, 11 Sep 2023 10:07:36 -0700 Subject: [PATCH 1/2] Remove mr --- cpp/include/cudf_test/base_fixture.hpp | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/cpp/include/cudf_test/base_fixture.hpp b/cpp/include/cudf_test/base_fixture.hpp index 05319e03003..a29ac092c83 100644 --- a/cpp/include/cudf_test/base_fixture.hpp +++ b/cpp/include/cudf_test/base_fixture.hpp @@ -47,17 +47,7 @@ namespace test { * class MyTestFixture : public cudf::test::BaseFixture {}; * ``` */ -class BaseFixture : public ::testing::Test { - rmm::mr::device_memory_resource* _mr{rmm::mr::get_current_device_resource()}; - - public: - /** - * @brief Returns pointer to `device_memory_resource` that should be used for - * all tests inheriting from this fixture - * @return pointer to memory resource - */ - rmm::mr::device_memory_resource* mr() { return _mr; } -}; +class BaseFixture : public ::testing::Test {}; /** * @brief Base test fixture that takes a parameter. @@ -68,17 +58,7 @@ class BaseFixture : public ::testing::Test { * ``` */ template -class BaseFixtureWithParam : public ::testing::TestWithParam { - rmm::mr::device_memory_resource* _mr{rmm::mr::get_current_device_resource()}; - - public: - /** - * @brief Returns pointer to `device_memory_resource` that should be used for - * all tests inheriting from this fixture - * @return pointer to memory resource - */ - rmm::mr::device_memory_resource* mr() const { return _mr; } -}; +class BaseFixtureWithParam : public ::testing::TestWithParam {}; template struct uniform_distribution_impl {}; From 7e46e6877be163af76163072db5b5914249acb8e Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Tue, 12 Sep 2023 11:46:53 -0400 Subject: [PATCH 2/2] Only use memory resources that haven't been freed --- cpp/include/cudf_test/base_fixture.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/include/cudf_test/base_fixture.hpp b/cpp/include/cudf_test/base_fixture.hpp index a29ac092c83..cf3e5db60cd 100644 --- a/cpp/include/cudf_test/base_fixture.hpp +++ b/cpp/include/cudf_test/base_fixture.hpp @@ -372,6 +372,7 @@ inline auto parse_cudf_test_opts(int argc, char** argv) auto adaptor = make_stream_checking_resource_adaptor( \ resource.get(), error_on_invalid_stream, check_default_stream); \ rmm::mr::set_current_device_resource(&adaptor); \ + return RUN_ALL_TESTS(); \ } \ \ return RUN_ALL_TESTS(); \