Skip to content

Commit 0684ee1

Browse files
authored
Fix bug in device_write(): it uses an incorrect size (#11651)
Fixed incorrect size when calling `device_write_async()`. Additionally, CI now runs the csv, orc, and parquet tests using the KvikIO backend. cc. @vuule Authors: - Mads R. B. Kristensen (https://github.com/madsbk) Approvers: - AJ Schmidt (https://github.com/ajschmidt8) - Bradley Dice (https://github.com/bdice) - Vukasin Milovanovic (https://github.com/vuule) - Nghia Truong (https://github.com/ttnghia) URL: #11651
1 parent e7f04cd commit 0684ee1

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

ci/gpu/build.sh

+15
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,13 @@ if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
152152
echo "Running GoogleTest $test_name"
153153
${gt} --gtest_output=xml:"$WORKSPACE/test-results/"
154154
done
155+
156+
# Test libcudf (csv, orc, and parquet) with `LIBCUDF_CUFILE_POLICY=KVIKIO`
157+
for test_name in "CSV_TEST" "ORC_TEST" "PARQUET_TEST"; do
158+
gt="$WORKSPACE/cpp/build/gtests/$test_name"
159+
echo "Running GoogleTest $test_name (LIBCUDF_CUFILE_POLICY=KVIKIO)"
160+
LIBCUDF_CUFILE_POLICY=KVIKIO ${gt} --gtest_output=xml:"$WORKSPACE/test-results/"
161+
done
155162
fi
156163
else
157164
#Project Flash
@@ -182,10 +189,18 @@ else
182189
gpuci_logger "GoogleTests"
183190
# Run libcudf and libcudf_kafka gtests from libcudf-tests package
184191
for gt in "$CONDA_PREFIX/bin/gtests/libcudf"*/* ; do
192+
test_name=$(basename ${gt})
185193
echo "Running GoogleTest $test_name"
186194
${gt} --gtest_output=xml:"$WORKSPACE/test-results/"
187195
done
188196

197+
# Test libcudf (csv, orc, and parquet) with `LIBCUDF_CUFILE_POLICY=KVIKIO`
198+
for test_name in "CSV_TEST" "ORC_TEST" "PARQUET_TEST"; do
199+
gt="$CONDA_PREFIX/bin/gtests/libcudf/$test_name"
200+
echo "Running GoogleTest $test_name (LIBCUDF_CUFILE_POLICY=KVIKIO)"
201+
LIBCUDF_CUFILE_POLICY=KVIKIO ${gt} --gtest_output=xml:"$WORKSPACE/test-results/"
202+
done
203+
189204
export LIB_BUILD_DIR="$WORKSPACE/ci/artifacts/cudf/cpu/libcudf_work/cpp/build"
190205
# Copy libcudf build time results
191206
echo "Checking for build time log $LIB_BUILD_DIR/ninja_log.xml"

cpp/src/io/utilities/data_sink.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ class file_sink : public data_sink {
8888

8989
void device_write(void const* gpu_data, size_t size, rmm::cuda_stream_view stream) override
9090
{
91-
if (!supports_device_write()) CUDF_FAIL("Device writes are not supported for this file.");
92-
return device_write_async(gpu_data, _bytes_written, stream).get();
91+
return device_write_async(gpu_data, size, stream).get();
9392
}
9493

9594
private:

0 commit comments

Comments
 (0)