From 7de2dc811f956461cfe68f1d518d46a841b099c5 Mon Sep 17 00:00:00 2001 From: Karthikeyan Natarajan Date: Wed, 28 Jul 2021 10:00:36 -0700 Subject: [PATCH] fix part of COPYING_TEST memory errors --- cpp/tests/copying/concatenate_tests.cu | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/cpp/tests/copying/concatenate_tests.cu b/cpp/tests/copying/concatenate_tests.cu index 7d3b7beb2cb..c513716859e 100644 --- a/cpp/tests/copying/concatenate_tests.cu +++ b/cpp/tests/copying/concatenate_tests.cu @@ -48,8 +48,6 @@ using Table = cudf::table; template struct TypedColumnTest : public cudf::test::BaseFixture { - static std::size_t data_size() { return 1000; } - static std::size_t mask_size() { return 100; } cudf::data_type type() { return cudf::data_type{cudf::type_to_id()}; } TypedColumnTest(rmm::cuda_stream_view stream = rmm::cuda_stream_default) @@ -58,14 +56,14 @@ struct TypedColumnTest : public cudf::test::BaseFixture { { auto typed_data = static_cast(data.data()); auto typed_mask = static_cast(mask.data()); - std::vector h_data(data_size()); + std::vector h_data(data.size()); std::iota(h_data.begin(), h_data.end(), char{0}); - std::vector h_mask(mask_size()); + std::vector h_mask(mask.size()); std::iota(h_mask.begin(), h_mask.end(), char{0}); CUDA_TRY(cudaMemcpyAsync( - typed_data, h_data.data(), data_size(), cudaMemcpyHostToDevice, stream.value())); + typed_data, h_data.data(), data.size(), cudaMemcpyHostToDevice, stream.value())); CUDA_TRY(cudaMemcpyAsync( - typed_mask, h_mask.data(), mask_size(), cudaMemcpyHostToDevice, stream.value())); + typed_mask, h_mask.data(), mask.size(), cudaMemcpyHostToDevice, stream.value())); stream.synchronize(); }