Skip to content

Commit

Permalink
Merge branch 'fea-host_read_async' of https://github.com/vuule/cudf i…
Browse files Browse the repository at this point in the history
…nto fea-host_read_async
  • Loading branch information
vuule committed Feb 20, 2025
2 parents aca9233 + 84ff62c commit 2ebad98
Show file tree
Hide file tree
Showing 76 changed files with 1,693 additions and 2,477 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/spark-rapids-jni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
spark-rapids-jni-build:
runs-on: linux-amd64-cpu8
container:
image: rapidsai/ci-spark-rapids-jni:rockylinux8-cuda12.2.0
image: rapidsai/ci-spark-rapids-jni:rockylinux8-cuda12.8.0
steps:
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 0 additions & 2 deletions ci/test_cudf_polars_polars_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ git clone https://github.com/pola-rs/polars.git --branch "${TAG}" --depth 1
# Install requirements for running polars tests
rapids-logger "Install polars test requirements"
rapids-pip-retry install -r polars/py-polars/requirements-dev.txt -r polars/py-polars/requirements-ci.txt
# TODO: Workaround until https://github.com/pola-rs/polars/issues/21274 is fixed.
rapids-pip-retry install connectorx==0.4.1

# shellcheck disable=SC2317
function set_exitcode()
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ dependencies:
- pandas
- pandas>=2.0,<2.2.4dev0
- pandoc
- polars>=1.20,<1.22
- polars>=1.20,<1.23
- pre-commit
- ptxcompiler
- pyarrow>=14.0.0,<20.0.0a0
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-128_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ dependencies:
- pandas
- pandas>=2.0,<2.2.4dev0
- pandoc
- polars>=1.20,<1.22
- polars>=1.20,<1.23
- pre-commit
- pyarrow>=14.0.0,<20.0.0a0
- pydata-sphinx-theme>=0.15.4
Expand Down
2 changes: 1 addition & 1 deletion conda/recipes/cudf-polars/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ requirements:
run:
- python
- pylibcudf ={{ version }}
- polars >=1.20,<1.22
- polars >=1.20,<1.23
- {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }}

test:
Expand Down
4 changes: 2 additions & 2 deletions cpp/include/cudf/column/column_device_view.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ namespace CUDF_EXPORT cudf {
*
*/
struct nullate {
struct YES : cuda::std::bool_constant<true> {};
struct NO : cuda::std::bool_constant<false> {};
struct YES : cuda::std::true_type {};
struct NO : cuda::std::false_type {};
/**
* @brief `nullate::DYNAMIC` defers the determination of nullability to run time rather than
* compile time. The calling code is responsible for specifying whether or not nulls are
Expand Down
191 changes: 1 addition & 190 deletions cpp/include/cudf/datetime.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2024, NVIDIA CORPORATION.
* Copyright (c) 2019-2025, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -54,195 +54,6 @@ enum class datetime_component : uint8_t {
NANOSECOND
};

/**
* @brief Extracts year from any datetime type and returns an int16_t
* cudf::column.
*
* @deprecated Deprecated in 24.12, to be removed in 25.02
*
* @param column cudf::column_view of the input datetime values
* @param stream CUDA stream used for device memory operations and kernel launches
* @param mr Device memory resource used to allocate device memory of the returned column
*
* @returns cudf::column of the extracted int16_t years
* @throw cudf::logic_error if input column datatype is not TIMESTAMP
*/
[[deprecated]] std::unique_ptr<cudf::column> extract_year(
cudf::column_view const& column,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Extracts month from any datetime type and returns an int16_t
* cudf::column.
*
* @deprecated Deprecated in 24.12, to be removed in 25.02
*
* @param column cudf::column_view of the input datetime values
* @param stream CUDA stream used for device memory operations and kernel launches
* @param mr Device memory resource used to allocate device memory of the returned column
*
* @returns cudf::column of the extracted int16_t months
* @throw cudf::logic_error if input column datatype is not TIMESTAMP
*/
[[deprecated]] std::unique_ptr<cudf::column> extract_month(
cudf::column_view const& column,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Extracts day from any datetime type and returns an int16_t
* cudf::column.
*
* @deprecated Deprecated in 24.12, to be removed in 25.02
*
* @param column cudf::column_view of the input datetime values
* @param stream CUDA stream used for device memory operations and kernel launches
* @param mr Device memory resource used to allocate device memory of the returned column
*
* @returns cudf::column of the extracted int16_t days
* @throw cudf::logic_error if input column datatype is not TIMESTAMP
*/
[[deprecated]] std::unique_ptr<cudf::column> extract_day(
cudf::column_view const& column,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Extracts a weekday from any datetime type and returns an int16_t
* cudf::column.
*
* @deprecated Deprecated in 24.12, to be removed in 25.02
*
* @param column cudf::column_view of the input datetime values
* @param stream CUDA stream used for device memory operations and kernel launches
* @param mr Device memory resource used to allocate device memory of the returned column
*
* @returns cudf::column of the extracted int16_t days
* @throw cudf::logic_error if input column datatype is not TIMESTAMP
*/
[[deprecated]] std::unique_ptr<cudf::column> extract_weekday(
cudf::column_view const& column,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Extracts hour from any datetime type and returns an int16_t
* cudf::column.
*
* @deprecated Deprecated in 24.12, to be removed in 25.02
*
* @param column cudf::column_view of the input datetime values
* @param stream CUDA stream used for device memory operations and kernel launches
* @param mr Device memory resource used to allocate device memory of the returned column
*
* @returns cudf::column of the extracted int16_t hours
* @throw cudf::logic_error if input column datatype is not TIMESTAMP
*/
[[deprecated]] std::unique_ptr<cudf::column> extract_hour(
cudf::column_view const& column,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Extracts minute from any datetime type and returns an int16_t
* cudf::column.
*
* @deprecated Deprecated in 24.12, to be removed in 25.02
*
* @param column cudf::column_view of the input datetime values
* @param stream CUDA stream used for device memory operations and kernel launches
* @param mr Device memory resource used to allocate device memory of the returned column
*
* @returns cudf::column of the extracted int16_t minutes
* @throw cudf::logic_error if input column datatype is not TIMESTAMP
*/
[[deprecated]] std::unique_ptr<cudf::column> extract_minute(
cudf::column_view const& column,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Extracts second from any datetime type and returns an int16_t
* cudf::column.
*
* @deprecated Deprecated in 24.12, to be removed in 25.02
*
* @param column cudf::column_view of the input datetime values
* @param stream CUDA stream used for device memory operations and kernel launches
* @param mr Device memory resource used to allocate device memory of the returned column
*
* @returns cudf::column of the extracted int16_t seconds
* @throw cudf::logic_error if input column datatype is not TIMESTAMP
*/
[[deprecated]] std::unique_ptr<cudf::column> extract_second(
cudf::column_view const& column,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Extracts millisecond fraction from any datetime type and returns an int16_t
* cudf::column.
*
* A millisecond fraction is only the 3 digits that make up the millisecond portion of a duration.
* For example, the millisecond fraction of 1.234567890 seconds is 234.
*
* @deprecated Deprecated in 24.12, to be removed in 25.02
*
* @param column cudf::column_view of the input datetime values
* @param stream CUDA stream used for device memory operations and kernel launches
* @param mr Device memory resource used to allocate device memory of the returned column
*
* @returns cudf::column of the extracted int16_t milliseconds
* @throw cudf::logic_error if input column datatype is not TIMESTAMP
*/
[[deprecated]] std::unique_ptr<cudf::column> extract_millisecond_fraction(
cudf::column_view const& column,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Extracts microsecond fraction from any datetime type and returns an int16_t
* cudf::column.
*
* A microsecond fraction is only the 3 digits that make up the microsecond portion of a duration.
* For example, the microsecond fraction of 1.234567890 seconds is 567.
*
* @deprecated Deprecated in 24.12, to be removed in 25.02
*
* @param column cudf::column_view of the input datetime values
* @param stream CUDA stream used for device memory operations and kernel launches
* @param mr Device memory resource used to allocate device memory of the returned column
*
* @returns cudf::column of the extracted int16_t microseconds
* @throw cudf::logic_error if input column datatype is not TIMESTAMP
*/
[[deprecated]] std::unique_ptr<cudf::column> extract_microsecond_fraction(
cudf::column_view const& column,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Extracts nanosecond fraction from any datetime type and returns an int16_t
* cudf::column.
*
* A nanosecond fraction is only the 3 digits that make up the nanosecond portion of a duration.
* For example, the nanosecond fraction of 1.234567890 seconds is 890.
*
* @deprecated Deprecated in 24.12, to be removed in 25.02
*
* @param column cudf::column_view of the input datetime values
* @param stream CUDA stream used for device memory operations and kernel launches
* @param mr Device memory resource used to allocate device memory of the returned column
*
* @returns cudf::column of the extracted int16_t nanoseconds
* @throw cudf::logic_error if input column datatype is not TIMESTAMP
*/
[[deprecated]] std::unique_ptr<cudf::column> extract_nanosecond_fraction(
cudf::column_view const& column,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Extracts the specified datetime component from any datetime type and
* returns an int16_t cudf::column.
Expand Down
92 changes: 1 addition & 91 deletions cpp/include/cudf/detail/datetime.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
* Copyright (c) 2021-2025, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -25,96 +25,6 @@
namespace CUDF_EXPORT cudf {
namespace datetime {
namespace detail {
/**
* @copydoc cudf::extract_year(cudf::column_view const&, rmm::cuda_stream_view,
* rmm::device_async_resource_ref)
*
*/
std::unique_ptr<cudf::column> extract_year(cudf::column_view const& column,
rmm::cuda_stream_view stream,
rmm::device_async_resource_ref mr);

/**
* @copydoc cudf::extract_month(cudf::column_view const&, rmm::cuda_stream_view,
* rmm::device_async_resource_ref)
*
*/
std::unique_ptr<cudf::column> extract_month(cudf::column_view const& column,
rmm::cuda_stream_view stream,
rmm::device_async_resource_ref mr);

/**
* @copydoc cudf::extract_day(cudf::column_view const&, rmm::cuda_stream_view,
* rmm::device_async_resource_ref)
*
*/
std::unique_ptr<cudf::column> extract_day(cudf::column_view const& column,
rmm::cuda_stream_view stream,
rmm::device_async_resource_ref mr);

/**
* @copydoc cudf::extract_weekday(cudf::column_view const&, rmm::cuda_stream_view,
* rmm::device_async_resource_ref)
*
*/
std::unique_ptr<cudf::column> extract_weekday(cudf::column_view const& column,
rmm::cuda_stream_view stream,
rmm::device_async_resource_ref mr);

/**
* @copydoc cudf::extract_hour(cudf::column_view const&, rmm::cuda_stream_view,
* rmm::device_async_resource_ref)
*
*/
std::unique_ptr<cudf::column> extract_hour(cudf::column_view const& column,
rmm::cuda_stream_view stream,
rmm::device_async_resource_ref mr);

/**
* @copydoc cudf::extract_minute(cudf::column_view const&, rmm::cuda_stream_view,
* rmm::device_async_resource_ref)
*
*/
std::unique_ptr<cudf::column> extract_minute(cudf::column_view const& column,
rmm::cuda_stream_view stream,
rmm::device_async_resource_ref mr);

/**
* @copydoc cudf::extract_second(cudf::column_view const&, rmm::cuda_stream_view,
* rmm::device_async_resource_ref)
*
*/
std::unique_ptr<cudf::column> extract_second(cudf::column_view const& column,
rmm::cuda_stream_view stream,
rmm::device_async_resource_ref mr);

/**
* @copydoc cudf::extract_millisecond_fraction(cudf::column_view const&, rmm::cuda_stream_view,
* rmm::device_async_resource_ref)
*
*/
std::unique_ptr<cudf::column> extract_millisecond_fraction(cudf::column_view const& column,
rmm::cuda_stream_view stream,
rmm::device_async_resource_ref mr);

/**
* @copydoc cudf::extract_microsecond_fraction(cudf::column_view const&, rmm::cuda_stream_view,
* rmm::device_async_resource_ref)
*
*/
std::unique_ptr<cudf::column> extract_microsecond_fraction(cudf::column_view const& column,
rmm::cuda_stream_view stream,
rmm::device_async_resource_ref mr);

/**
* @copydoc cudf::extract_nanosecond_fraction(cudf::column_view const&, rmm::cuda_stream_view,
* rmm::device_async_resource_ref)
*
*/
std::unique_ptr<cudf::column> extract_nanosecond_fraction(cudf::column_view const& column,
rmm::cuda_stream_view stream,
rmm::device_async_resource_ref mr);

/**
* @copydoc cudf::extract_datetime_component(cudf::column_view const&, datetime_component,
* rmm::cuda_stream_view, rmm::device_async_resource_ref)
Expand Down
6 changes: 3 additions & 3 deletions cpp/include/cudf/detail/utilities/integer_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ CUDF_HOST_DEVICE constexpr S div_rounding_up_unsafe(S const& dividend, T const&

namespace detail {
template <typename I>
CUDF_HOST_DEVICE constexpr I div_rounding_up_safe(cuda::std::integral_constant<bool, false>,
CUDF_HOST_DEVICE constexpr I div_rounding_up_safe(cuda::std::false_type,
I dividend,
I divisor) noexcept
{
Expand All @@ -130,7 +130,7 @@ CUDF_HOST_DEVICE constexpr I div_rounding_up_safe(cuda::std::integral_constant<b
}

template <typename I>
CUDF_HOST_DEVICE constexpr I div_rounding_up_safe(cuda::std::integral_constant<bool, true>,
CUDF_HOST_DEVICE constexpr I div_rounding_up_safe(cuda::std::true_type,
I dividend,
I divisor) noexcept
{
Expand Down Expand Up @@ -160,7 +160,7 @@ CUDF_HOST_DEVICE constexpr I div_rounding_up_safe(cuda::std::integral_constant<b
template <typename I>
CUDF_HOST_DEVICE constexpr I div_rounding_up_safe(I dividend, I divisor) noexcept
{
using i_is_a_signed_type = cuda::std::integral_constant<bool, cuda::std::is_signed_v<I>>;
using i_is_a_signed_type = cuda::std::bool_constant<cuda::std::is_signed_v<I>>;
return detail::div_rounding_up_safe(i_is_a_signed_type{}, dividend, divisor);
}

Expand Down
Loading

0 comments on commit 2ebad98

Please sign in to comment.