Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Clean up mr_ref test splits
  • Loading branch information
bdice committed Dec 8, 2025
commit cad95211dd02b965a2ab06840419e383557a1834
14 changes: 3 additions & 11 deletions cpp/tests/mr/mr_ref_arena_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,23 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "mr_ref_test.hpp"

#include <rmm/mr/arena_memory_resource.hpp>
#include <rmm/mr/cuda_memory_resource.hpp>
#include <rmm/mr/per_device_resource.hpp>
#include <rmm/resource_ref.hpp>

#include <gtest/gtest.h>
#include "mr_ref_test_allocation.hpp"
#include "mr_ref_test_basic.hpp"
#include "mr_ref_test_mt.hpp"

namespace rmm::test {
namespace {

// Single-threaded basic tests (5 tests)
INSTANTIATE_TEST_SUITE_P(ArenaResourceTests,
mr_ref_test,
::testing::Values("Arena"),
[](auto const& info) { return info.param; });

// Single-threaded allocation tests (9 tests)
INSTANTIATE_TEST_SUITE_P(ArenaResourceAllocationTests,
mr_ref_allocation_test,
::testing::Values("Arena"),
[](auto const& info) { return info.param; });

// Multi-threaded tests (15 tests)
INSTANTIATE_TEST_SUITE_P(ArenaMultiThreadResourceTests,
mr_ref_test_mt,
::testing::Values("Arena"),
Expand Down
14 changes: 3 additions & 11 deletions cpp/tests/mr/mr_ref_binning_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,23 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "mr_ref_test.hpp"

#include <rmm/mr/binning_memory_resource.hpp>
#include <rmm/mr/cuda_memory_resource.hpp>
#include <rmm/mr/per_device_resource.hpp>
#include <rmm/resource_ref.hpp>

#include <gtest/gtest.h>
#include "mr_ref_test_allocation.hpp"
#include "mr_ref_test_basic.hpp"
#include "mr_ref_test_mt.hpp"

namespace rmm::test {
namespace {

// Single-threaded basic tests (5 tests)
INSTANTIATE_TEST_SUITE_P(BinningResourceTests,
mr_ref_test,
::testing::Values("Binning"),
[](auto const& info) { return info.param; });

// Single-threaded allocation tests (9 tests)
INSTANTIATE_TEST_SUITE_P(BinningResourceAllocationTests,
mr_ref_allocation_test,
::testing::Values("Binning"),
[](auto const& info) { return info.param; });

// Multi-threaded tests (15 tests)
INSTANTIATE_TEST_SUITE_P(BinningMultiThreadResourceTests,
mr_ref_test_mt,
::testing::Values("Binning"),
Expand Down
14 changes: 3 additions & 11 deletions cpp/tests/mr/mr_ref_cuda_async_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,23 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "mr_ref_test.hpp"

#include <rmm/mr/cuda_async_memory_resource.hpp>
#include <rmm/mr/cuda_memory_resource.hpp>
#include <rmm/mr/per_device_resource.hpp>
#include <rmm/resource_ref.hpp>

#include <gtest/gtest.h>
#include "mr_ref_test_allocation.hpp"
#include "mr_ref_test_basic.hpp"
#include "mr_ref_test_mt.hpp"

namespace rmm::test {
namespace {

// Single-threaded basic tests (5 tests)
INSTANTIATE_TEST_SUITE_P(CudaAsyncResourceTests,
mr_ref_test,
::testing::Values("CUDA_Async"),
[](auto const& info) { return info.param; });

// Single-threaded allocation tests (9 tests)
INSTANTIATE_TEST_SUITE_P(CudaAsyncResourceAllocationTests,
mr_ref_allocation_test,
::testing::Values("CUDA_Async"),
[](auto const& info) { return info.param; });

// Multi-threaded tests (15 tests)
INSTANTIATE_TEST_SUITE_P(CudaAsyncMultiThreadResourceTests,
mr_ref_test_mt,
::testing::Values("CUDA_Async"),
Expand Down
13 changes: 3 additions & 10 deletions cpp/tests/mr/mr_ref_cuda_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,23 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "mr_ref_test.hpp"

#include <rmm/mr/cuda_memory_resource.hpp>
#include <rmm/mr/per_device_resource.hpp>
#include <rmm/resource_ref.hpp>

#include <gtest/gtest.h>
#include "mr_ref_test_allocation.hpp"
#include "mr_ref_test_basic.hpp"
#include "mr_ref_test_mt.hpp"

namespace rmm::test {
namespace {

// Single-threaded basic tests (5 tests)
INSTANTIATE_TEST_SUITE_P(CudaResourceTests,
mr_ref_test,
::testing::Values("CUDA"),
[](auto const& info) { return info.param; });

// Single-threaded allocation tests (9 tests)
INSTANTIATE_TEST_SUITE_P(CudaResourceAllocationTests,
mr_ref_allocation_test,
::testing::Values("CUDA"),
[](auto const& info) { return info.param; });

// Multi-threaded tests (15 tests)
INSTANTIATE_TEST_SUITE_P(CudaMultiThreadResourceTests,
mr_ref_test_mt,
::testing::Values("CUDA"),
Expand Down
5 changes: 0 additions & 5 deletions cpp/tests/mr/mr_ref_default_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
namespace rmm::test {
namespace {

// Suppress warnings about uninstantiated parameterized tests in this file
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(mr_ref_test);
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(mr_ref_allocation_test);
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(mr_ref_test_mt);

// Helper functions for multi-threaded tests
template <typename Task, typename... Arguments>
void spawn_n(std::size_t num_threads, Task task, Arguments&&... args)
Expand Down
14 changes: 1 addition & 13 deletions cpp/tests/mr/mr_ref_fixed_size_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,11 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "mr_ref_test.hpp"

#include <rmm/mr/cuda_memory_resource.hpp>
#include <rmm/mr/fixed_size_memory_resource.hpp>
#include <rmm/mr/per_device_resource.hpp>
#include <rmm/resource_ref.hpp>

#include <gtest/gtest.h>
#include "mr_ref_test_basic.hpp"

namespace rmm::test {
namespace {

// Suppress warnings about uninstantiated tests (Fixed_Size only has basic tests)
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(mr_ref_allocation_test);
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(mr_ref_test_mt);

// Single-threaded basic tests (5 tests)
// Note: Fixed_Size MR cannot handle dynamic allocation sizes, so only basic tests are included
INSTANTIATE_TEST_SUITE_P(FixedSizeResourceTests,
mr_ref_test,
Expand Down
13 changes: 3 additions & 10 deletions cpp/tests/mr/mr_ref_managed_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,23 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "mr_ref_test.hpp"

#include <rmm/mr/cuda_memory_resource.hpp>
#include <rmm/mr/per_device_resource.hpp>
#include <rmm/resource_ref.hpp>

#include <gtest/gtest.h>
#include "mr_ref_test_allocation.hpp"
#include "mr_ref_test_basic.hpp"
#include "mr_ref_test_mt.hpp"

namespace rmm::test {
namespace {

// Single-threaded basic tests (5 tests)
INSTANTIATE_TEST_SUITE_P(ManagedResourceTests,
mr_ref_test,
::testing::Values("Managed"),
[](auto const& info) { return info.param; });

// Single-threaded allocation tests (9 tests)
INSTANTIATE_TEST_SUITE_P(ManagedResourceAllocationTests,
mr_ref_allocation_test,
::testing::Values("Managed"),
[](auto const& info) { return info.param; });

// Multi-threaded tests (15 tests)
INSTANTIATE_TEST_SUITE_P(ManagedMultiThreadResourceTests,
mr_ref_test_mt,
::testing::Values("Managed"),
Expand Down
17 changes: 2 additions & 15 deletions cpp/tests/mr/mr_ref_pinned_pool_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,21 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "mr_ref_test.hpp"

#include <rmm/mr/cuda_memory_resource.hpp>
#include <rmm/mr/per_device_resource.hpp>
#include <rmm/mr/pinned_host_memory_resource.hpp>
#include <rmm/resource_ref.hpp>

#include <gtest/gtest.h>
#include "mr_ref_test_allocation.hpp"
#include "mr_ref_test_basic.hpp"

namespace rmm::test {
namespace {

// Suppress warning about uninstantiated multi-threaded tests (PinnedPool doesn't support MT tests)
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(mr_ref_test_mt);

// Single-threaded basic tests (5 tests)
INSTANTIATE_TEST_SUITE_P(PinnedPoolResourceTests,
mr_ref_test,
::testing::Values("PinnedPool"),
[](auto const& info) { return info.param; });

// Single-threaded allocation tests (9 tests)
INSTANTIATE_TEST_SUITE_P(PinnedPoolResourceAllocationTests,
mr_ref_allocation_test,
::testing::Values("PinnedPool"),
[](auto const& info) { return info.param; });

// Note: No multi-threaded tests for PinnedPool memory resource

} // namespace
} // namespace rmm::test
17 changes: 2 additions & 15 deletions cpp/tests/mr/mr_ref_pinned_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,21 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "mr_ref_test.hpp"

#include <rmm/mr/cuda_memory_resource.hpp>
#include <rmm/mr/per_device_resource.hpp>
#include <rmm/mr/pinned_host_memory_resource.hpp>
#include <rmm/resource_ref.hpp>

#include <gtest/gtest.h>
#include "mr_ref_test_allocation.hpp"
#include "mr_ref_test_basic.hpp"

namespace rmm::test {
namespace {

// Suppress warning about uninstantiated multi-threaded tests (Pinned doesn't support MT tests)
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(mr_ref_test_mt);

// Single-threaded basic tests (5 tests)
INSTANTIATE_TEST_SUITE_P(PinnedResourceTests,
mr_ref_test,
::testing::Values("Pinned"),
[](auto const& info) { return info.param; });

// Single-threaded allocation tests (9 tests)
INSTANTIATE_TEST_SUITE_P(PinnedResourceAllocationTests,
mr_ref_allocation_test,
::testing::Values("Pinned"),
[](auto const& info) { return info.param; });

// Note: No multi-threaded tests for Pinned memory resource

} // namespace
} // namespace rmm::test
14 changes: 3 additions & 11 deletions cpp/tests/mr/mr_ref_pool_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,23 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "mr_ref_test.hpp"

#include <rmm/mr/cuda_memory_resource.hpp>
#include <rmm/mr/per_device_resource.hpp>
#include <rmm/mr/pool_memory_resource.hpp>
#include <rmm/resource_ref.hpp>

#include <gtest/gtest.h>
#include "mr_ref_test_allocation.hpp"
#include "mr_ref_test_basic.hpp"
#include "mr_ref_test_mt.hpp"

namespace rmm::test {
namespace {

// Single-threaded basic tests (5 tests)
INSTANTIATE_TEST_SUITE_P(PoolResourceTests,
mr_ref_test,
::testing::Values("Pool"),
[](auto const& info) { return info.param; });

// Single-threaded allocation tests (9 tests)
INSTANTIATE_TEST_SUITE_P(PoolResourceAllocationTests,
mr_ref_allocation_test,
::testing::Values("Pool"),
[](auto const& info) { return info.param; });

// Multi-threaded tests (15 tests)
INSTANTIATE_TEST_SUITE_P(PoolMultiThreadResourceTests,
mr_ref_test_mt,
::testing::Values("Pool"),
Expand Down
17 changes: 2 additions & 15 deletions cpp/tests/mr/mr_ref_system_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,21 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include "mr_ref_test.hpp"

#include <rmm/mr/cuda_memory_resource.hpp>
#include <rmm/mr/per_device_resource.hpp>
#include <rmm/mr/system_memory_resource.hpp>
#include <rmm/resource_ref.hpp>

#include <gtest/gtest.h>
#include "mr_ref_test_allocation.hpp"
#include "mr_ref_test_basic.hpp"

namespace rmm::test {
namespace {

// Suppress warning about uninstantiated multi-threaded tests (System doesn't support MT tests)
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(mr_ref_test_mt);

// Single-threaded basic tests (5 tests)
INSTANTIATE_TEST_SUITE_P(SystemResourceTests,
mr_ref_test,
::testing::Values("System"),
[](auto const& info) { return info.param; });

// Single-threaded allocation tests (9 tests)
INSTANTIATE_TEST_SUITE_P(SystemResourceAllocationTests,
mr_ref_allocation_test,
::testing::Values("System"),
[](auto const& info) { return info.param; });

// Note: No multi-threaded tests for System memory resource

} // namespace
} // namespace rmm::test
Loading