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

Make more constexpr available on device for cuIO #17746

Open
wants to merge 21 commits into
base: branch-25.02
Choose a base branch
from

Conversation

PointKernel
Copy link
Member

Description

Contributes to #7795

This PR addressed most of the relaxed constexpr in cuIO.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@PointKernel PointKernel added feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. cuIO cuIO issue non-breaking Non-breaking change labels Jan 15, 2025
@PointKernel PointKernel self-assigned this Jan 15, 2025
Copy link

copy-pr-bot bot commented Jan 15, 2025

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@PointKernel
Copy link
Member Author

/ok to test

cpp/include/cudf/utilities/span.hpp Outdated Show resolved Hide resolved
cpp/src/io/parquet/compact_protocol_reader.cpp Outdated Show resolved Hide resolved
cpp/src/io/parquet/parquet_gpu.hpp Show resolved Hide resolved
@PointKernel PointKernel added the 4 - Needs Review Waiting for reviewer to review or respond label Jan 15, 2025
@PointKernel PointKernel marked this pull request as ready for review January 15, 2025 18:58
@PointKernel PointKernel requested a review from a team as a code owner January 15, 2025 18:58
@PointKernel PointKernel requested review from vuule and lamarrr January 15, 2025 18:58
@kingcrimsontianyu kingcrimsontianyu self-requested a review January 15, 2025 22:03
Copy link
Contributor

@vuule vuule left a comment

Choose a reason for hiding this comment

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

few small comments/questions

@@ -28,7 +28,7 @@
namespace cudf::io::parquet::detail {

struct page_state_s {
constexpr page_state_s() noexcept {}
CUDF_HOST_DEVICE constexpr page_state_s() noexcept {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Pretty sure the struct is not intended for compile-time use. All uses I see are in shared memory.

Suggested change
CUDF_HOST_DEVICE constexpr page_state_s() noexcept {}
CUDF_HOST_DEVICE page_state_s() noexcept {}

@@ -105,15 +105,15 @@ struct delta_binary_decoder {

// returns the value stored in the `value` array at index
// `rolling_index<delta_rolling_buf_size>(idx)`. If `idx` is `0`, then return `first_value`.
constexpr zigzag128_t value_at(size_type idx)
__device__ constexpr zigzag128_t value_at(size_type idx)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
__device__ constexpr zigzag128_t value_at(size_type idx)
__device__ zigzag128_t value_at(size_type idx)

{
return idx == 0 ? first_value : value[rolling_index<delta_rolling_buf_size>(idx)];
}

// returns the number of values encoded in the block data. when all_values is true,
// account for the first value in the header. otherwise just count the values encoded
// in the mini-block data.
constexpr uint32_t num_encoded_values(bool all_values)
__device__ constexpr uint32_t num_encoded_values(bool all_values)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
__device__ constexpr uint32_t num_encoded_values(bool all_values)
__device__ uint32_t num_encoded_values(bool all_values)

@@ -41,6 +41,21 @@ namespace cudf {
namespace strings {
namespace detail {

template <typename Iter>
struct string_offsets_fn {
Copy link
Contributor

Choose a reason for hiding this comment

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

why this change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - Needs Review Waiting for reviewer to review or respond cuIO cuIO issue feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
Status: Burndown
Development

Successfully merging this pull request may close these issues.

3 participants