From f2f2fe4ec02721d86a1a982297aa053b53fbdcd6 Mon Sep 17 00:00:00 2001 From: Nghia Truong Date: Mon, 20 Nov 2023 15:24:12 -0800 Subject: [PATCH] Add comment Signed-off-by: Nghia Truong --- src/main/cpp/src/row_conversion.cu | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/cpp/src/row_conversion.cu b/src/main/cpp/src/row_conversion.cu index 4826025b5c..bbfe50863a 100644 --- a/src/main/cpp/src/row_conversion.cu +++ b/src/main/cpp/src/row_conversion.cu @@ -1557,6 +1557,9 @@ batch_data build_batches(size_type num_rows, batch_row_boundaries.push_back(0); size_type last_row_end = 0; device_uvector cumulative_row_sizes(num_rows, stream); + + // Evaluate the row size values before calling `inclusive_scan` to workaround + // memory issue in https://github.com/NVIDIA/spark-rapids-jni/issues/1567. thrust::copy(rmm::exec_policy(stream), row_sizes, row_sizes + num_rows, cumulative_row_sizes.begin()); thrust::inclusive_scan(rmm::exec_policy(stream), cumulative_row_sizes.begin(),