Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More minor fixes for CCCL #17793

Open
wants to merge 2 commits into
base: branch-25.02
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions cpp/include/cudf/ast/detail/operators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#include <cudf/utilities/error.hpp>
#include <cudf/utilities/type_dispatcher.hpp>

#include <cuda/std/optional>
#include <cuda/std/type_traits>
#include <thrust/optional.h>

#include <cmath>
#include <type_traits>
Expand All @@ -35,14 +35,14 @@ namespace ast {

namespace detail {

// Type trait for wrapping nullable types in a thrust::optional. Non-nullable
// Type trait for wrapping nullable types in a cuda::std::optional. Non-nullable
// types are returned as is.
template <typename T, bool has_nulls>
struct possibly_null_value;

template <typename T>
struct possibly_null_value<T, true> {
using type = thrust::optional<T>;
using type = cuda::std::optional<T>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why we didn't do this before in #15091 or #16604?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, I might have answered it myself. #15091 (comment)

Device uses of thrust::optional can be replaced with cuda::std::optional in a future PR, once we upgrade to CCCL 2.3 or newer

Is that why?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. We saw test failures with cuda::std::optional here. #15091 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same failures appear again, there is definitely something fishy going on

};

template <typename T>
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/io/avro/reader_impl.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
* Copyright (c) 2020-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 @@ -303,7 +303,7 @@ rmm::device_buffer decompress_data(datasource& source,
size_t const max_uncomp_block_size = std::reduce(
uncompressed_data_sizes.begin(), uncompressed_data_sizes.end(), 0, thrust::maximum<size_t>());

size_t temp_size;
size_t temp_size = 0;
status =
nvcompBatchedSnappyDecompressGetTempSize(num_blocks, max_uncomp_block_size, &temp_size);
CUDF_EXPECTS(status == nvcompStatus_t::nvcompSuccess,
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/quantiles/tdigest/tdigest_aggregation.cu
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 Down Expand Up @@ -1088,7 +1088,7 @@ std::pair<rmm::device_uvector<double>, rmm::device_uvector<double>> generate_mer
size_type i) { return tdigest_offsets[group_offsets[i]]; }));

// perform the sort using the means as the key
size_t temp_size;
size_t temp_size = 0;
CUDF_CUDA_TRY(cub::DeviceSegmentedSort::SortPairs(nullptr,
temp_size,
tdv.means().begin<double>(),
Expand Down
Loading