From 90d60cb6a6a75ff1bd304a5020482dc9b187ca50 Mon Sep 17 00:00:00 2001 From: "Mads R. B. Kristensen" Date: Fri, 20 Jan 2023 21:28:27 +0100 Subject: [PATCH] Fixing BUG, `get_next_chunk()` should use the blocking function `device_read()` (#12584) `datasource_chunk_reader.get_next_chunk()` called `device_read_async()` without waiting on the returned Future. Should fix the CI fail in https://github.com/rapidsai/cudf/pull/12574 cc. @vuule Authors: - Mads R. B. Kristensen (https://github.com/madsbk) Approvers: - AJ Schmidt (https://github.com/ajschmidt8) - Vukasin Milovanovic (https://github.com/vuule) - Yunsong Wang (https://github.com/PointKernel) URL: https://github.com/rapidsai/cudf/pull/12584 --- ci/gpu/build.sh | 6 +++--- ci/test_cpp.sh | 4 ++-- cpp/src/io/text/data_chunk_source_factories.cpp | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index e1082872d71..12539badfdb 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2018-2022, NVIDIA CORPORATION. +# Copyright (c) 2018-2023, NVIDIA CORPORATION. ############################################## # cuDF GPU build and test script for CI # ############################################## @@ -169,7 +169,7 @@ if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then done # Test libcudf (csv, orc, and parquet) with `LIBCUDF_CUFILE_POLICY=KVIKIO` - for test_name in "CSV_TEST" "ORC_TEST" "PARQUET_TEST"; do + for test_name in "CSV_TEST" "ORC_TEST" "PARQUET_TEST" "DATA_CHUNK_SOURCE_TEST"; do gt="$WORKSPACE/cpp/build/gtests/$test_name" echo "Running GoogleTest $test_name (LIBCUDF_CUFILE_POLICY=KVIKIO)" LIBCUDF_CUFILE_POLICY=KVIKIO ${gt} --gtest_output=xml:"$WORKSPACE/test-results/" @@ -232,7 +232,7 @@ else done # Test libcudf (csv, orc, and parquet) with `LIBCUDF_CUFILE_POLICY=KVIKIO` - for test_name in "CSV_TEST" "ORC_TEST" "PARQUET_TEST"; do + for test_name in "CSV_TEST" "ORC_TEST" "PARQUET_TEST" "DATA_CHUNK_SOURCE_TEST"; do gt="$CONDA_PREFIX/bin/gtests/libcudf/$test_name" echo "Running GoogleTest $test_name (LIBCUDF_CUFILE_POLICY=KVIKIO)" LIBCUDF_CUFILE_POLICY=KVIKIO ${gt} --gtest_output=xml:"$WORKSPACE/test-results/" diff --git a/ci/test_cpp.sh b/ci/test_cpp.sh index 5c6461d0796..368a78a2025 100755 --- a/ci/test_cpp.sh +++ b/ci/test_cpp.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2022, NVIDIA CORPORATION. +# Copyright (c) 2022-2023, NVIDIA CORPORATION. set -euo pipefail @@ -71,7 +71,7 @@ done rapids-logger "Run gtests with kvikio" # Test libcudf (csv, orc, and parquet) with `LIBCUDF_CUFILE_POLICY=KVIKIO` -for test_name in "CSV_TEST" "ORC_TEST" "PARQUET_TEST"; do +for test_name in "CSV_TEST" "ORC_TEST" "PARQUET_TEST" "DATA_CHUNK_SOURCE_TEST"; do gt="$CONDA_PREFIX/bin/gtests/libcudf/${test_name}" echo "Running gtest $test_name (LIBCUDF_CUFILE_POLICY=KVIKIO)" LIBCUDF_CUFILE_POLICY=KVIKIO ${gt} --gtest_output=xml:${RAPIDS_TESTS_DIR} diff --git a/cpp/src/io/text/data_chunk_source_factories.cpp b/cpp/src/io/text/data_chunk_source_factories.cpp index 1a111fd6041..b6c88c1346f 100644 --- a/cpp/src/io/text/data_chunk_source_factories.cpp +++ b/cpp/src/io/text/data_chunk_source_factories.cpp @@ -74,8 +74,7 @@ class datasource_chunk_reader : public data_chunk_reader { auto chunk = rmm::device_uvector(read_size, stream); if (_source->supports_device_read() && _source->is_device_read_preferred(read_size)) { - _source->device_read_async( - _offset, read_size, reinterpret_cast(chunk.data()), stream); + _source->device_read(_offset, read_size, reinterpret_cast(chunk.data()), stream); } else { auto& h_ticket = _tickets[_next_ticket_idx];