Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove mr from test fixtures #14075

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 3 additions & 22 deletions cpp/include/cudf_test/base_fixture.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -68,17 +58,7 @@ class BaseFixture : public ::testing::Test {
* ```
*/
template <typename T>
class BaseFixtureWithParam : public ::testing::TestWithParam<T> {
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<T> {};

template <typename T, typename Enable = void>
struct uniform_distribution_impl {};
Expand Down Expand Up @@ -392,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(); \
Expand Down
Loading