Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 10 additions & 26 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -568,36 +568,20 @@ jobs:
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
secrets: inherit # zizmor: ignore[secrets-inherit]
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.java-build-matrix.outputs.matrix) }}
runs-on: linux-${{ matrix.ARCH }}-gpu-l4-latest-1
container:
image: rapidsai/ci-wheel:26.10-cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PY_VER }} # zizmor: ignore[unpinned-images]
env:
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- name: Download java-build artifact
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: cudf_java_${{ matrix.ARCH }}_cu${{ matrix.CUDA_MAJOR }}
path: java_pkg
- name: Run Java tests
env:
LIBCUDF_LARGE_STRINGS_ENABLED: "0"
run: |
. java/ci/java_classifier.sh
JAVA_JAR="$(cudf_java_resolve_artifact_jar java_pkg)"
export JAVA_JAR
ci/test_packaged_java.sh
with:
build_type: pull-request
arch: ${{ matrix.ARCH }}
node_type: "gpu-l4-latest-1"
container_image: "rapidsai/ci-wheel:26.10-cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PY_VER }}"
script: "ci/test_packaged_java.sh"
conda-notebook-tests:
needs: [conda-python-build, conda-python-build-noarch, changed-files]
permissions:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,37 @@ jobs:
arch: "amd64"
container_image: "rapidsai/ci-conda:26.10-latest"
script: "ci/test_java.sh"
# Test the packaged cuDF Java JAR built by build.yaml java-build for every Maven classifier.
java-build-matrix:
permissions:
contents: read
uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main
with:
build_type: ${{ inputs.build_type }}
matrix_name: conda-cpp-build
matrix_filter: 'map(. + {CUDA_MAJOR: (.CUDA_VER | split(".") | .[0])})'
java-tests:
needs: [java-build-matrix]
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
secrets: inherit # zizmor: ignore[secrets-inherit]
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.java-build-matrix.outputs.matrix) }}
with:
build_type: ${{ inputs.build_type }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
arch: ${{ matrix.ARCH }}
node_type: "gpu-l4-latest-1"
container_image: "rapidsai/ci-wheel:26.10-cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PY_VER }}"
script: "ci/test_packaged_java.sh"
conda-notebook-tests:
permissions:
actions: read
Expand Down
40 changes: 35 additions & 5 deletions ci/test_packaged_java.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,50 @@
# Run the Java tests against an already-packaged classifier JAR.
#
# Activates -Ppackaged-jar-tests so the surefire classpath uses the JAR at
# JAVA_JAR instead of a locally compiled target/classes tree. Caller places
# the JAR (e.g. via actions/download-artifact) before invoking this script.
# JAVA_JAR instead of a locally compiled target/classes tree.
#
# When JAVA_JAR is unset, download the java-build artifact via
# rapids-download-from-github (pr.yaml for PRs, build.yaml otherwise).
#
# Inputs (environment variables):
# JAVA_JAR Absolute path to the classifier JAR (required).
# JAVA_JAR Optional. Absolute path to the classifier JAR.
# If unset, the JAR is downloaded from the
# matching java-build artifact.
# LIBCUDF_LARGE_STRINGS_ENABLED Optional; defaults to 0 (same as ci/test_java.sh).

set -euo pipefail

REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "${REPO_ROOT}"

if [[ -z ${JAVA_JAR:-} || ! -f ${JAVA_JAR} ]]; then
echo "Error: JAVA_JAR must point to an existing classifier JAR" >&2
# shellcheck disable=SC1091
. "${REPO_ROOT}/java/ci/java_classifier.sh"

if [[ -z ${JAVA_JAR:-} ]]; then
if [[ -z ${RAPIDS_CUDA_VERSION:-} ]]; then
echo "Error: RAPIDS_CUDA_VERSION must be set when JAVA_JAR is unset" >&2
exit 1
fi
cuda_major="${RAPIDS_CUDA_VERSION%%.*}"

# matrix.ARCH values are amd64/arm64; $(arch) / uname -m return x86_64/aarch64.
case "$(uname -m)" in
x86_64) java_arch=amd64 ;;
aarch64|arm64) java_arch=arm64 ;;
*)
echo "Error: unsupported host arch '$(uname -m)'" >&2
exit 1
;;
esac

rapids-logger "Downloading cudf_java_${java_arch}_cu${cuda_major}"
JAVA_PKG="$(rapids-download-from-github "cudf_java_${java_arch}_cu${cuda_major}")"
JAVA_JAR="$(cudf_java_resolve_artifact_jar "${JAVA_PKG}")"
export JAVA_JAR
fi

if [[ ! -f ${JAVA_JAR} ]]; then
echo "Error: JAVA_JAR='${JAVA_JAR}' does not point to an existing file" >&2
exit 1
fi

Expand Down
5 changes: 2 additions & 3 deletions cpp/include/cudf/ast/detail/expression_evaluator.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION.
* SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
Expand All @@ -16,10 +16,9 @@
#include <cudf/utilities/span.hpp>
#include <cudf/utilities/traits.hpp>

#include <rmm/cuda_stream_view.hpp>

#include <cuda/std/type_traits>
#include <cuda/std/utility>
#include <cuda/stream>

namespace cudf::ast::detail {

Expand Down
8 changes: 4 additions & 4 deletions cpp/include/cudf/ast/detail/expression_parser.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION.
* SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
Expand Down Expand Up @@ -106,7 +106,7 @@ class expression_parser {
cudf::table_view const& left,
std::optional<std::reference_wrapper<cudf::table_view const>> right,
bool has_nulls,
rmm::cuda_stream_view stream,
cuda::stream_ref stream,
rmm::device_async_resource_ref mr);

/**
Expand All @@ -121,7 +121,7 @@ class expression_parser {
expression_parser(expression const& expr,
cudf::table_view const& table,
bool has_nulls,
rmm::cuda_stream_view stream,
cuda::stream_ref stream,
rmm::device_async_resource_ref mr);

/**
Expand Down Expand Up @@ -240,7 +240,7 @@ class expression_parser {
alignment = std::max(alignment, static_cast<cudf::size_type>(alignof(T)));
}

void move_to_device(rmm::cuda_stream_view stream, rmm::device_async_resource_ref mr);
void move_to_device(cuda::stream_ref stream, rmm::device_async_resource_ref mr);

/**
* @brief Helper function for recursive traversal of expressions.
Expand Down
18 changes: 10 additions & 8 deletions cpp/include/cudf/ast/expressions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include <cudf/types.hpp>
#include <cudf/utilities/error.hpp>

#include <cuda/stream>

#include <cstdint>
#include <functional>
#include <initializer_list>
Expand Down Expand Up @@ -101,7 +103,7 @@ struct [[nodiscard]] expression {
* @param stream CUDA stream used for device memory operations and kernel launches
* @return `true` if the expression may evaluate to null, otherwise false
*/
[[nodiscard]] bool may_evaluate_null(table_view const& left, rmm::cuda_stream_view stream) const
[[nodiscard]] bool may_evaluate_null(table_view const& left, cuda::stream_ref stream) const
{
return may_evaluate_null(left, left, stream);
}
Expand All @@ -116,7 +118,7 @@ struct [[nodiscard]] expression {
*/
[[nodiscard]] virtual bool may_evaluate_null(table_view const& left,
table_view const& right,
rmm::cuda_stream_view stream) const = 0;
cuda::stream_ref stream) const = 0;

virtual ~expression() {}
};
Expand Down Expand Up @@ -384,7 +386,7 @@ class literal : public expression {

[[nodiscard]] bool may_evaluate_null(table_view const& left,
table_view const& right,
rmm::cuda_stream_view stream) const override
cuda::stream_ref stream) const override
{
return !is_valid(stream);
}
Expand All @@ -395,7 +397,7 @@ class literal : public expression {
* @param stream CUDA stream used for device memory operations and kernel launches
* @return true if the underlying scalar is valid
*/
[[nodiscard]] bool is_valid(rmm::cuda_stream_view stream) const
[[nodiscard]] bool is_valid(cuda::stream_ref stream) const
{
if (auto* s = std::get_if<ast_scalar>(&scalar)) {
return s->scalar.get().is_valid(stream);
Expand Down Expand Up @@ -477,7 +479,7 @@ class column_reference : public expression {

[[nodiscard]] bool may_evaluate_null(table_view const& left,
table_view const& right,
rmm::cuda_stream_view stream) const override
cuda::stream_ref stream) const override
{
return (table_source == table_reference::LEFT ? left : right).column(column_index).has_nulls();
}
Expand Down Expand Up @@ -552,7 +554,7 @@ class operation : public expression {

[[nodiscard]] bool may_evaluate_null(table_view const& left,
table_view const& right,
rmm::cuda_stream_view stream) const override;
cuda::stream_ref stream) const override;

/**
* @copydoc expression::accept
Expand Down Expand Up @@ -592,7 +594,7 @@ class predicate : public expression {

[[nodiscard]] bool may_evaluate_null(table_view const& left,
table_view const& right,
rmm::cuda_stream_view stream) const override;
cuda::stream_ref stream) const override;

/**
* @copydoc expression::accept
Expand Down Expand Up @@ -645,7 +647,7 @@ class column_name_reference : public expression {

[[nodiscard]] bool may_evaluate_null(table_view const& left,
table_view const& right,
rmm::cuda_stream_view stream) const override
cuda::stream_ref stream) const override
{
return true;
}
Expand Down
24 changes: 12 additions & 12 deletions cpp/include/cudf/datetime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <cudf/utilities/export.hpp>
#include <cudf/utilities/memory_resource.hpp>

#include <rmm/cuda_stream_view.hpp>
#include <cuda/stream>

#include <memory>

Expand Down Expand Up @@ -57,7 +57,7 @@ enum class datetime_component : uint8_t {
std::unique_ptr<cudf::column> extract_datetime_component(
cudf::column_view const& column,
datetime_component component,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
cuda::stream_ref stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/** @} */ // end of group
Expand All @@ -79,7 +79,7 @@ std::unique_ptr<cudf::column> extract_datetime_component(
*/
std::unique_ptr<cudf::column> last_day_of_month(
cudf::column_view const& column,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
cuda::stream_ref stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
Expand All @@ -95,7 +95,7 @@ std::unique_ptr<cudf::column> last_day_of_month(
*/
std::unique_ptr<cudf::column> day_of_year(
cudf::column_view const& column,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
cuda::stream_ref stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
Expand Down Expand Up @@ -132,7 +132,7 @@ std::unique_ptr<cudf::column> day_of_year(
std::unique_ptr<cudf::column> add_calendrical_months(
cudf::column_view const& timestamps,
cudf::column_view const& months,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
cuda::stream_ref stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
Expand Down Expand Up @@ -169,7 +169,7 @@ std::unique_ptr<cudf::column> add_calendrical_months(
std::unique_ptr<cudf::column> add_calendrical_months(
cudf::column_view const& timestamps,
cudf::scalar const& months,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
cuda::stream_ref stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
Expand All @@ -188,7 +188,7 @@ std::unique_ptr<cudf::column> add_calendrical_months(
*/
std::unique_ptr<cudf::column> is_leap_year(
cudf::column_view const& column,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
cuda::stream_ref stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
Expand All @@ -207,7 +207,7 @@ std::unique_ptr<cudf::column> is_leap_year(
*/
std::unique_ptr<cudf::column> days_in_month(
cudf::column_view const& column,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
cuda::stream_ref stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
Expand All @@ -227,7 +227,7 @@ std::unique_ptr<cudf::column> days_in_month(
*/
std::unique_ptr<cudf::column> extract_quarter(
cudf::column_view const& column,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
cuda::stream_ref stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
Expand Down Expand Up @@ -258,7 +258,7 @@ enum class rounding_frequency : int32_t {
std::unique_ptr<cudf::column> ceil_datetimes(
cudf::column_view const& column,
rounding_frequency freq,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
cuda::stream_ref stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
Expand All @@ -275,7 +275,7 @@ std::unique_ptr<cudf::column> ceil_datetimes(
std::unique_ptr<cudf::column> floor_datetimes(
cudf::column_view const& column,
rounding_frequency freq,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
cuda::stream_ref stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
Expand All @@ -292,7 +292,7 @@ std::unique_ptr<cudf::column> floor_datetimes(
std::unique_ptr<cudf::column> round_datetimes(
cudf::column_view const& column,
rounding_frequency freq,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
cuda::stream_ref stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/** @} */ // end of group
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/cudf/detail/aggregation/aggregation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1382,7 +1382,7 @@ bool is_valid_aggregation(data_type source, aggregation::Kind k);
*/
void initialize_with_identity(mutable_table_view const& table,
host_span<cudf::aggregation::Kind const> aggs,
rmm::cuda_stream_view stream);
cuda::stream_ref stream);

} // namespace detail
} // namespace cudf
Loading
Loading