Skip to content

Fix CUDA 12.8 build compiler warnings #4924

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

Merged
merged 8 commits into from
Feb 7, 2025
Merged
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
40 changes: 28 additions & 12 deletions cpp/include/cugraph/edge_src_dst_property.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,10 @@ class edge_src_property_t {
{
property_.clear(handle);

edge_partition_keys_ = std::nullopt;
edge_partition_key_chunk_start_offsets_ = std::nullopt;
if constexpr (GraphViewType::is_multi_gpu && !GraphViewType::is_storage_transposed) {
edge_partition_keys_ = std::nullopt;
edge_partition_key_chunk_start_offsets_ = std::nullopt;
}
}

auto view() const { return property_.view(); }
Expand All @@ -457,10 +459,16 @@ class edge_src_property_t {
detail::edge_major_property_t<typename GraphViewType::vertex_type, T>>
property_;

std::optional<std::vector<raft::device_span<typename GraphViewType::vertex_type const>>>
edge_partition_keys_{std::nullopt};
std::optional<std::vector<raft::device_span<typename GraphViewType::vertex_type const>>>
edge_partition_key_chunk_start_offsets_{std::nullopt};
std::conditional_t<
GraphViewType::is_multi_gpu && !GraphViewType::is_storage_transposed,
std::optional<std::vector<raft::device_span<typename GraphViewType::vertex_type const>>>,
std::byte>
edge_partition_keys_{};
std::conditional_t<
GraphViewType::is_multi_gpu && !GraphViewType::is_storage_transposed,
std::optional<std::vector<raft::device_span<typename GraphViewType::vertex_type const>>>,
std::byte>
edge_partition_key_chunk_start_offsets_{};
};

template <typename GraphViewType, typename T>
Expand Down Expand Up @@ -536,8 +544,10 @@ class edge_dst_property_t {
{
property_.clear(handle);

edge_partition_keys_ = std::nullopt;
edge_partition_key_chunk_start_offsets_ = std::nullopt;
if constexpr (GraphViewType::is_multi_gpu && GraphViewType::is_storage_transposed) {
edge_partition_keys_ = std::nullopt;
edge_partition_key_chunk_start_offsets_ = std::nullopt;
}
}

auto view() const { return property_.view(); }
Expand All @@ -549,10 +559,16 @@ class edge_dst_property_t {
detail::edge_minor_property_t<typename GraphViewType::vertex_type, T>>
property_;

std::optional<std::vector<raft::device_span<typename GraphViewType::vertex_type const>>>
edge_partition_keys_{std::nullopt};
std::optional<std::vector<raft::device_span<typename GraphViewType::vertex_type const>>>
edge_partition_key_chunk_start_offsets_{std::nullopt};
std::conditional_t<
GraphViewType::is_multi_gpu && GraphViewType::is_storage_transposed,
std::optional<std::vector<raft::device_span<typename GraphViewType::vertex_type const>>>,
std::byte /* dummy */>
edge_partition_keys_{};
std::conditional_t<
GraphViewType::is_multi_gpu && GraphViewType::is_storage_transposed,
std::optional<std::vector<raft::device_span<typename GraphViewType::vertex_type const>>>,
std::byte /* dummy */>
edge_partition_key_chunk_start_offsets_{};
};

class edge_src_dummy_property_t {
Expand Down
22 changes: 11 additions & 11 deletions cpp/src/detail/utility_wrappers_impl.cuh
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 @@ -123,16 +123,16 @@ vertex_t compute_maximum_vertex_id(rmm::cuda_stream_view const& stream_view,
vertex_t const* d_edgelist_dsts,
size_t num_edges)
{
auto edge_first = thrust::make_zip_iterator(thrust::make_tuple(d_edgelist_srcs, d_edgelist_dsts));

return thrust::transform_reduce(
rmm::exec_policy(stream_view),
edge_first,
edge_first + num_edges,
cuda::proclaim_return_type<vertex_t>(
[] __device__(auto e) -> vertex_t { return std::max(thrust::get<0>(e), thrust::get<1>(e)); }),
vertex_t{0},
thrust::maximum<vertex_t>());
auto max_v_first =
thrust::make_transform_iterator(thrust::make_zip_iterator(d_edgelist_srcs, d_edgelist_dsts),
cuda::proclaim_return_type<vertex_t>([] __device__(auto e) {
return cuda::std::max(thrust::get<0>(e), thrust::get<1>(e));
}));
return thrust::reduce(rmm::exec_policy(stream_view),
max_v_first,
max_v_first + num_edges,
vertex_t{0},
thrust::maximum<vertex_t>{});
}

template <typename vertex_t, typename edge_t>
Expand Down
Loading