diff --git a/cpp/tests/io/fst/fst_test.cu b/cpp/tests/io/fst/fst_test.cu index 8c43aa92455..b6d5327bb59 100644 --- a/cpp/tests/io/fst/fst_test.cu +++ b/cpp/tests/io/fst/fst_test.cu @@ -20,15 +20,16 @@ #include #include +#include +#include #include +#include #include #include #include #include -#include "cub/cub.cuh" - #include #include @@ -212,8 +213,13 @@ TEST_F(FstTest, GroundTruth) R"(} {} [] [ ])"; // Repeat input sample 1024x - for (std::size_t i = 0; i < 10; i++) - input += input; + size_t string_size = 1 << 10; + auto d_input_scalar = cudf::make_string_scalar(input); + auto& d_string_scalar = static_cast(*d_input_scalar); + const cudf::size_type repeat_times = string_size / input.size(); + auto d_input_string = cudf::strings::repeat_string(d_string_scalar, repeat_times); + auto& d_input = static_cast&>(*d_input_string); + input = d_input.to_string(stream); @@ -260,7 +266,7 @@ TEST_F(FstTest, GroundTruth) std::back_inserter(out_index_cpu)); // Make sure results have been copied back to host - cudaStreamSynchronize(stream.value()); + stream.synchronize(); // Verify results ASSERT_EQ(output_gpu_size[0], output_cpu.size());