Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix shuffle comm operators with no default constructors #4869

Open
wants to merge 1 commit into
base: branch-25.02
Choose a base branch
from

Conversation

caugonnet
Copy link

Operators such as key_group_id_less_t are templated by functors which we instantiate using lambda functions. These lambda functions may have capture lists so that there is no default constructor, and we cannot call the default constructor of this operator.

This solves the following errors :


/home/caugonnet/git/caugonnet_cugraph/cpp/include/cugraph/utilities/shuffle_comm.cuh(172): error: the default constructor of "lambda [](auto)->auto" cannot be referenced -- it is a deleted function
    ValueToGroupIdOp value_to_group_id_op{};
                                         ^
          detected during:
            instantiation of class "cugraph::detail::value_group_id_greater_equal_t<value_type, ValueToGroupIdOp> [with value_type=int, ValueToGroupIdOp=lambda [](auto)->auto]" at line 626 of /home/caugonnet/git/caugonnet_cugraph/cpp/build/_deps/cccl-src/lib/cmake/libcudacxx/../../../libcudacxx/include/cuda/std/detail/libcxx/include/tuple
            instantiation of class "cuda::std::__4::__tuple_constraints<_Tp...> [with _Tp=<cugraph::detail::value_group_id_greater_equal_t<int, lambda [](auto)->auto>>]" at line 629 of /home/caugonnet/git/caugonnet_cugraph/cpp/build/_deps/cccl-src/lib/cmake/libcudacxx/../../../libcudacxx/include/cuda/std/detail/libcxx/include/tuple
            instantiation of class "cuda::std::__4::__tuple_constraints<_Tp...> [with _Tp=<cugraph::detail::value_group_id_greater_equal_t<int, lambda [](auto)->auto>>]" at line 157 of /home/caugonnet/git/caugonnet_cugraph/cpp/build/_deps/cccl-src/lib/cmake/libcudacxx/../../../libcudacxx/include/cuda/std/__type_traits/is_constructible.h
            instantiation of "const __nv_bool cuda::std::__4::is_constructible_v [with _Tp=cuda::std::__4::tuple<cugraph::detail::value_group_id_greater_equal_t<int, lambda [](auto)->auto>>, _Args=<>]" at line 51 of /home/caugonnet/git/caugonnet_cugraph/cpp/build/_deps/cccl-src/lib/cmake/libcudacxx/../../../libcudacxx/include/cuda/std/__functional/not_fn.h
            instantiation of class "cuda::std::__4::__not_fn_t<_Fn> [with _Fn=cugraph::detail::value_group_id_greater_equal_t<int, lambda [](auto)->auto>]" at line 56 of /home/caugonnet/git/caugonnet_cugraph/cpp/build/_deps/cccl-src/lib/cmake/libcudacxx/../../../libcudacxx/include/cuda/std/__functional/not_fn.h
            [ 3 instantiation contexts not shown ]
            instantiation of "ValueIterator cugraph::detail::mem_frugal_partition(ValueIterator, ValueIterator, ValueToGroupIdOp, int, rmm::cuda_stream_view) [with ValueIterator=int32_t *, ValueToGroupIdOp=lambda [](auto)->auto]" at line 615
            instantiation of "void cugraph::detail::mem_frugal_groupby(ValueIterator, ValueIterator, ValueToGroupIdOp, int, size_t, rmm::cuda_stream_view) [with ValueIterator=int32_t *, ValueToGroupIdOp=lambda [](auto)->auto]" at line 775
            instantiation of "rmm::device_uvector<size_t> cugraph::groupby_and_count(ValueIterator, ValueIterator, ValueToGroupIdOp, int, size_t, rmm::cuda_stream_view) [with ValueIterator=int32_t *, ValueToGroupIdOp=lambda [](auto)->auto]" at line 42 of /home/caugonnet/git/caugonnet_cugraph/cpp/src/utilities/shuffle_vertices.cuh
            instantiation of "rmm::device_uvector<vertex_t> cugraph::<unnamed>::shuffle_vertices_by_gpu_id_impl(const raft::handle_t &, rmm::device_uvector<vertex_t> &&, func_t) [with vertex_t=int32_t, func_t=cugraph::detail::compute_gpu_id_from_int_vertex_t<int32_t>]" at line 158 of /home/caugonnet/git/caugonnet_cugraph/cpp/src/utilities/shuffle_vertices.cuh
            instantiation of "rmm::device_uvector<vertex_t> cugraph::detail::shuffle_int_vertices_to_local_gpu_by_vertex_partitioning(const raft::handle_t &, rmm::device_uvector<vertex_t> &&, const std::vector<vertex_t, std::allocator<vertex_t>> &) [with vertex_t=int32_t]" at line 31 of /home/caugonnet/git/caugonnet_cugraph/cpp/src/utilities/shuffle_vertices_mg_v32_integral.cu

instantiate using lambda functions. These lambda functions may have capture
lists so that there is no default constructor, and we cannot call the default
constructor of this operator.
@caugonnet caugonnet requested a review from a team as a code owner January 17, 2025 14:04
Copy link

copy-pr-bot bot commented Jan 17, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant