diff --git a/cpp/test/matrix/linewise_op.cu b/cpp/test/matrix/linewise_op.cu index 931c3ecb16..c61af89bec 100644 --- a/cpp/test/matrix/linewise_op.cu +++ b/cpp/test/matrix/linewise_op.cu @@ -108,7 +108,7 @@ struct LinewiseTest : public ::testing::TestWithParam T { return a + b; }; - auto vec_view = raft::make_device_vector_view(vec, lineLen); + auto vec_view = raft::make_device_vector_view(vec, alongLines ? lineLen : nLines); matrix::linewise_op(handle, in, out, alongLines, f, vec_view); } @@ -234,8 +234,8 @@ struct LinewiseTest : public ::testing::TestWithParam::mapping> layout{extents}; matrix_size_padded = layout.required_span_size(); } else { - auto extents = matrix_extent{m, n}; + auto extents = matrix_extent{n, m}; typename raft::layout_left_padded::mapping> layout{extents}; matrix_size_padded = layout.required_span_size(); } @@ -259,9 +259,9 @@ struct LinewiseTest : public ::testing::TestWithParam>( - blob_in.data(), nLines, lineLen); + blob_in.data(), n, m); auto outSpan = make_device_aligned_matrix_view>( - blob_out.data(), nLines, lineLen); + blob_out.data(), n, m); // prep padded input data thrust::for_each_n(rmm::exec_policy(stream), thrust::make_counting_iterator(0ul), @@ -271,7 +271,7 @@ struct LinewiseTest : public ::testing::TestWithParam>( - blob_in.data(), nLines, lineLen); + blob_in.data(), n, m); runLinewiseSumPadded>( outSpan, inSpanConst, lineLen, nLines, alongRows, vec1); @@ -292,9 +292,9 @@ struct LinewiseTest : public ::testing::TestWithParam>( - blob_in.data(), lineLen, nLines); + blob_in.data(), n, m); auto outSpan = make_device_aligned_matrix_view>( - blob_out.data(), lineLen, nLines); + blob_out.data(), n, m); // prep padded input data thrust::for_each_n(rmm::exec_policy(stream), thrust::make_counting_iterator(0ul), @@ -304,7 +304,7 @@ struct LinewiseTest : public ::testing::TestWithParam>( - blob_in.data(), lineLen, nLines); + blob_in.data(), n, m); runLinewiseSumPadded>( outSpan, inSpanConst, lineLen, nLines, alongRows, vec1);