Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/branch-23.04' into fix_force_n…
Browse files Browse the repository at this point in the history
…ullable_schema
  • Loading branch information
galipremsagar committed Mar 24, 2023
2 parents 6894263 + 9fbc249 commit 26517c9
Show file tree
Hide file tree
Showing 104 changed files with 1,388 additions and 775 deletions.
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 @@ -44,7 +44,7 @@ dependencies:
- nbsphinx
- ninja
- notebook
- numba>=0.56.2
- numba>=0.56.4,<0.57
- numpy>=1.21
- numpydoc
- nvcc_linux-64=11.8
Expand Down
4 changes: 2 additions & 2 deletions conda/recipes/cudf/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ requirements:
- cython >=0.29,<0.30
- scikit-build >=0.13.1
- setuptools
- numba >=0.56.2
- numba >=0.56.4,<0.57
- dlpack >=0.5,<0.6.0a0
- pyarrow =10
- libcudf ={{ version }}
Expand All @@ -64,7 +64,7 @@ requirements:
- typing_extensions
- pandas >=1.3,<1.6.0dev0
- cupy >=9.5.0,<12.0.0a0
- numba >=0.56.2
- numba >=0.56.4,<0.57
- numpy >=1.21
- {{ pin_compatible('pyarrow', max_pin='x.x.x') }}
- libcudf {{ version }}
Expand Down
4 changes: 2 additions & 2 deletions conda/recipes/libcudf/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ outputs:
- test -f $PREFIX/include/cudf/detail/nvtx/nvtx3.hpp
- test -f $PREFIX/include/cudf/detail/nvtx/ranges.hpp
- test -f $PREFIX/include/cudf/detail/quantiles.hpp
- test -f $PREFIX/include/cudf/detail/reduction_functions.hpp
- test -f $PREFIX/include/cudf/detail/repeat.hpp
- test -f $PREFIX/include/cudf/detail/replace.hpp
- test -f $PREFIX/include/cudf/detail/reshape.hpp
Expand All @@ -123,7 +122,6 @@ outputs:
- test -f $PREFIX/include/cudf/detail/scan.hpp
- test -f $PREFIX/include/cudf/detail/scatter.hpp
- test -f $PREFIX/include/cudf/detail/search.hpp
- test -f $PREFIX/include/cudf/detail/segmented_reduction_functions.hpp
- test -f $PREFIX/include/cudf/detail/sequence.hpp
- test -f $PREFIX/include/cudf/detail/sorting.hpp
- test -f $PREFIX/include/cudf/detail/stream_compaction.hpp
Expand Down Expand Up @@ -218,6 +216,8 @@ outputs:
- test -f $PREFIX/include/cudf/partitioning.hpp
- test -f $PREFIX/include/cudf/quantiles.hpp
- test -f $PREFIX/include/cudf/reduction.hpp
- test -f $PREFIX/include/cudf/reduction/detail/reduction_functions.hpp
- test -f $PREFIX/include/cudf/reduction/detail/segmented_reduction_functions.hpp
- test -f $PREFIX/include/cudf/replace.hpp
- test -f $PREFIX/include/cudf/reshape.hpp
- test -f $PREFIX/include/cudf/rolling.hpp
Expand Down
16 changes: 7 additions & 9 deletions cpp/include/cudf/detail/concatenate.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2022, NVIDIA CORPORATION.
* Copyright (c) 2020-2023, 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 @@ -33,20 +33,18 @@ namespace detail {
*
* @param stream CUDA stream used for device memory operations and kernel launches.
*/
std::unique_ptr<column> concatenate(
host_span<column_view const> columns_to_concat,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
std::unique_ptr<column> concatenate(host_span<column_view const> columns_to_concat,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr);

/**
* @copydoc cudf::concatenate(host_span<table_view const>,rmm::mr::device_memory_resource*)
*
* @param stream CUDA stream used for device memory operations and kernel launches.
*/
std::unique_ptr<table> concatenate(
host_span<table_view const> tables_to_concat,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
std::unique_ptr<table> concatenate(host_span<table_view const> tables_to_concat,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr);

} // namespace detail
} // namespace cudf
41 changes: 19 additions & 22 deletions cpp/include/cudf/detail/copy_if.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2022, NVIDIA CORPORATION.
* Copyright (c) 2019-2023, 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 @@ -229,14 +229,13 @@ struct DeviceType<T, std::enable_if_t<cudf::is_fixed_point<T>()>> {
template <typename Filter, int block_size>
struct scatter_gather_functor {
template <typename T, std::enable_if_t<cudf::is_fixed_width<T>()>* = nullptr>
std::unique_ptr<cudf::column> operator()(
cudf::column_view const& input,
cudf::size_type const& output_size,
cudf::size_type const* block_offsets,
Filter filter,
cudf::size_type per_thread,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource())
std::unique_ptr<cudf::column> operator()(cudf::column_view const& input,
cudf::size_type const& output_size,
cudf::size_type const* block_offsets,
Filter filter,
cudf::size_type per_thread,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr)
{
auto output_column = cudf::detail::allocate_like(
input, output_size, cudf::mask_allocation_policy::RETAIN, stream, mr);
Expand Down Expand Up @@ -277,14 +276,13 @@ struct scatter_gather_functor {

template <typename T,
std::enable_if_t<!cudf::is_fixed_width<T>() and !cudf::is_fixed_point<T>()>* = nullptr>
std::unique_ptr<cudf::column> operator()(
cudf::column_view const& input,
cudf::size_type const& output_size,
cudf::size_type const*,
Filter filter,
cudf::size_type,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource())
std::unique_ptr<cudf::column> operator()(cudf::column_view const& input,
cudf::size_type const& output_size,
cudf::size_type const*,
Filter filter,
cudf::size_type,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr)
{
rmm::device_uvector<cudf::size_type> indices(output_size, stream);

Expand Down Expand Up @@ -320,11 +318,10 @@ struct scatter_gather_functor {
* @return unique_ptr<table> The table generated from filtered `input`.
*/
template <typename Filter>
std::unique_ptr<table> copy_if(
table_view const& input,
Filter filter,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource())
std::unique_ptr<table> copy_if(table_view const& input,
Filter filter,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr)
{
CUDF_FUNC_RANGE();

Expand Down
19 changes: 9 additions & 10 deletions cpp/include/cudf/detail/copy_if_else.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2022, NVIDIA CORPORATION.
* Copyright (c) 2019-2023, 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 @@ -145,15 +145,14 @@ __launch_bounds__(block_size) __global__
* by `filter[i]`
*/
template <typename FilterFn, typename LeftIter, typename RightIter>
std::unique_ptr<column> copy_if_else(
bool nullable,
LeftIter lhs_begin,
LeftIter lhs_end,
RightIter rhs,
FilterFn filter,
cudf::data_type output_type,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource())
std::unique_ptr<column> copy_if_else(bool nullable,
LeftIter lhs_begin,
LeftIter lhs_end,
RightIter rhs,
FilterFn filter,
cudf::data_type output_type,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr)
{
// This is the type of the thrust::optional element in the passed iterators
using Element = typename thrust::iterator_traits<LeftIter>::value_type::value_type;
Expand Down
17 changes: 8 additions & 9 deletions cpp/include/cudf/detail/copy_range.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2022, NVIDIA CORPORATION.
* Copyright (c) 2019-2023, 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 @@ -203,14 +203,13 @@ void copy_range_in_place(column_view const& source,
* @param stream CUDA stream used for device memory operations and kernel launches.
* @return std::unique_ptr<column> The result target column
*/
std::unique_ptr<column> copy_range(
column_view const& source,
column_view const& target,
size_type source_begin,
size_type source_end,
size_type target_begin,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
std::unique_ptr<column> copy_range(column_view const& source,
column_view const& target,
size_type source_begin,
size_type source_end,
size_type target_begin,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr);

} // namespace detail
} // namespace cudf
13 changes: 6 additions & 7 deletions cpp/include/cudf/detail/null_mask.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,12 @@ __global__ void offset_bitmask_binop(Binop op,
* @param stream CUDA stream used for device memory operations and kernel launches
*/
template <typename Binop>
std::pair<rmm::device_buffer, size_type> bitmask_binop(
Binop op,
host_span<bitmask_type const* const> masks,
host_span<size_type const> masks_begin_bits,
size_type mask_size_bits,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource())
std::pair<rmm::device_buffer, size_type> bitmask_binop(Binop op,
host_span<bitmask_type const* const> masks,
host_span<size_type const> masks_begin_bits,
size_type mask_size_bits,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr)
{
auto dest_mask = rmm::device_buffer{bitmask_allocation_size_bytes(mask_size_bits), stream, mr};
auto null_count =
Expand Down
54 changes: 24 additions & 30 deletions cpp/include/cudf/detail/null_mask.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2022, NVIDIA CORPORATION.
* Copyright (c) 2019-2023, 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 @@ -31,11 +31,10 @@ namespace detail {
*
* @param stream CUDA stream used for device memory operations and kernel launches.
*/
rmm::device_buffer create_null_mask(
size_type size,
mask_state state,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
rmm::device_buffer create_null_mask(size_type size,
mask_state state,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr);

/**
* @copydoc cudf::set_null_mask(bitmask_type*, size_type, size_type, bool)
Expand Down Expand Up @@ -209,55 +208,50 @@ std::vector<size_type> segmented_null_count(bitmask_type const* bitmask,
*
* @param stream CUDA stream used for device memory operations and kernel launches.
*/
rmm::device_buffer copy_bitmask(
bitmask_type const* mask,
size_type begin_bit,
size_type end_bit,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
rmm::device_buffer copy_bitmask(bitmask_type const* mask,
size_type begin_bit,
size_type end_bit,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr);

/**
* @copydoc cudf::copy_bitmask(column_view const& view, rmm::mr::device_memory_resource*)
*
* @param stream CUDA stream used for device memory operations and kernel launches.
*/
rmm::device_buffer copy_bitmask(
column_view const& view,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
rmm::device_buffer copy_bitmask(column_view const& view,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr);

/**
* @copydoc bitmask_and(host_span<bitmask_type const* const>, host_span<size_type> const,
* size_type, rmm::mr::device_memory_resource *)
*
* @param stream CUDA stream used for device memory operations and kernel launches
*/
std::pair<rmm::device_buffer, size_type> bitmask_and(
host_span<bitmask_type const* const> masks,
host_span<size_type const> masks_begin_bits,
size_type mask_size_bits,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
std::pair<rmm::device_buffer, size_type> bitmask_and(host_span<bitmask_type const* const> masks,
host_span<size_type const> masks_begin_bits,
size_type mask_size_bits,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr);

/**
* @copydoc cudf::bitmask_and
*
* @param[in] stream CUDA stream used for device memory operations and kernel launches.
*/
std::pair<rmm::device_buffer, size_type> bitmask_and(
table_view const& view,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
std::pair<rmm::device_buffer, size_type> bitmask_and(table_view const& view,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr);

/**
* @copydoc cudf::bitmask_or
*
* @param[in] stream CUDA stream used for device memory operations and kernel launches.
*/
std::pair<rmm::device_buffer, size_type> bitmask_or(
table_view const& view,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
std::pair<rmm::device_buffer, size_type> bitmask_or(table_view const& view,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr);

/**
* @brief Performs a bitwise AND of the specified bitmasks,
Expand Down
22 changes: 10 additions & 12 deletions cpp/include/cudf/detail/repeat.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2022, NVIDIA CORPORATION.
* Copyright (c) 2019-2023, 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 @@ -32,24 +32,22 @@ namespace detail {
*
* @param stream CUDA stream used for device memory operations and kernel launches.
*/
std::unique_ptr<table> repeat(
table_view const& input_table,
column_view const& count,
bool check_count,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
std::unique_ptr<table> repeat(table_view const& input_table,
column_view const& count,
bool check_count,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr);

/**
* @copydoc cudf::repeat(table_view const&, size_type,
* rmm::mr::device_memory_resource*)
*
* @param stream CUDA stream used for device memory operations and kernel launches.
*/
std::unique_ptr<table> repeat(
table_view const& input_table,
size_type count,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
std::unique_ptr<table> repeat(table_view const& input_table,
size_type count,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr);

} // namespace detail
} // namespace cudf
Loading

0 comments on commit 26517c9

Please sign in to comment.