Skip to content

Commit

Permalink
Fixing BUG, get_next_chunk() should use the blocking function `devi…
Browse files Browse the repository at this point in the history
…ce_read()` (#12584)

`datasource_chunk_reader.get_next_chunk()` called `device_read_async()` without waiting on the returned Future.

Should fix the CI fail in #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: #12584
  • Loading branch information
madsbk authored Jan 20, 2023
1 parent cc37c72 commit 90d60cb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions ci/gpu/build.sh
Original file line number Diff line number Diff line change
@@ -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 #
##############################################
Expand Down Expand Up @@ -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/"
Expand Down Expand Up @@ -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/"
Expand Down
4 changes: 2 additions & 2 deletions ci/test_cpp.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2022, NVIDIA CORPORATION.
# Copyright (c) 2022-2023, NVIDIA CORPORATION.

set -euo pipefail

Expand Down Expand Up @@ -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}
Expand Down
3 changes: 1 addition & 2 deletions cpp/src/io/text/data_chunk_source_factories.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ class datasource_chunk_reader : public data_chunk_reader {
auto chunk = rmm::device_uvector<char>(read_size, stream);

if (_source->supports_device_read() && _source->is_device_read_preferred(read_size)) {
_source->device_read_async(
_offset, read_size, reinterpret_cast<uint8_t*>(chunk.data()), stream);
_source->device_read(_offset, read_size, reinterpret_cast<uint8_t*>(chunk.data()), stream);
} else {
auto& h_ticket = _tickets[_next_ticket_idx];

Expand Down

0 comments on commit 90d60cb

Please sign in to comment.