From c39b61800e26bf11580a5f88ba7c87e3c3d49afe Mon Sep 17 00:00:00 2001 From: Seunghwa Kang Date: Mon, 18 Jul 2022 18:06:27 -0700 Subject: [PATCH 01/13] delete eidir_graph.hpp --- cpp/include/cugraph/eidir_graph.hpp | 45 ----------------------------- cpp/src/community/legacy/louvain.cu | 1 - 2 files changed, 46 deletions(-) delete mode 100644 cpp/include/cugraph/eidir_graph.hpp diff --git a/cpp/include/cugraph/eidir_graph.hpp b/cpp/include/cugraph/eidir_graph.hpp deleted file mode 100644 index b1acaaf5cce..00000000000 --- a/cpp/include/cugraph/eidir_graph.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2020-2021, NVIDIA CORPORATION. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#pragma once - -namespace cugraph { - -template class graph_view_t; -template class graph_view_t; -template class graph_view_t; -template class graph_view_t; -template class graph_view_t; -template class graph_view_t; -template class graph_view_t; -template class graph_view_t; -template class graph_view_t; -template class graph_view_t; -template class graph_view_t; -template class graph_view_t; -template class graph_view_t; -template class graph_view_t; -template class graph_view_t; -template class graph_view_t; -template class graph_view_t; -template class graph_view_t; -template class graph_view_t; -template class graph_view_t; -template class graph_view_t; -template class graph_view_t; -template class graph_view_t; -template class graph_view_t; - -} // namespace cugraph diff --git a/cpp/src/community/legacy/louvain.cu b/cpp/src/community/legacy/louvain.cu index 17ae62d9ddf..742cf1f6cdc 100644 --- a/cpp/src/community/legacy/louvain.cu +++ b/cpp/src/community/legacy/louvain.cu @@ -123,4 +123,3 @@ template std::pair louvain(raft::handle_t const&, double); } // namespace cugraph -#include From f19cd41a4402c1b9d34eb6b4572fb4ea094c7448 Mon Sep 17 00:00:00 2001 From: Seunghwa Kang Date: Mon, 18 Jul 2022 18:11:50 -0700 Subject: [PATCH 02/13] move functions.hpp to legacy --- cpp/include/cugraph/{ => legacy}/functions.hpp | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename cpp/include/cugraph/{ => legacy}/functions.hpp (100%) diff --git a/cpp/include/cugraph/functions.hpp b/cpp/include/cugraph/legacy/functions.hpp similarity index 100% rename from cpp/include/cugraph/functions.hpp rename to cpp/include/cugraph/legacy/functions.hpp From ca7cf7f69cd98d5d52022e75e9e4a5243f60ca41 Mon Sep 17 00:00:00 2001 From: Seunghwa Kang Date: Mon, 18 Jul 2022 18:33:56 -0700 Subject: [PATCH 03/13] move functions.hpp to legacy --- cpp/src/converters/COOtoCSR.cu | 1 - cpp/src/converters/COOtoCSR.cuh | 2 +- cpp/tests/utilities/matrix_market_file_utilities.cu | 2 +- cpp/tests/utilities/test_graphs.hpp | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cpp/src/converters/COOtoCSR.cu b/cpp/src/converters/COOtoCSR.cu index 904b2856c49..59c641b59a7 100644 --- a/cpp/src/converters/COOtoCSR.cu +++ b/cpp/src/converters/COOtoCSR.cu @@ -15,7 +15,6 @@ */ #include "COOtoCSR.cuh" -#include namespace cugraph { diff --git a/cpp/src/converters/COOtoCSR.cuh b/cpp/src/converters/COOtoCSR.cuh index bd9a165f90d..09f3d131b8e 100644 --- a/cpp/src/converters/COOtoCSR.cuh +++ b/cpp/src/converters/COOtoCSR.cuh @@ -41,7 +41,7 @@ #include #include -#include +#include #include diff --git a/cpp/tests/utilities/matrix_market_file_utilities.cu b/cpp/tests/utilities/matrix_market_file_utilities.cu index ae546973bf7..8ec0c3c8843 100644 --- a/cpp/tests/utilities/matrix_market_file_utilities.cu +++ b/cpp/tests/utilities/matrix_market_file_utilities.cu @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include #include diff --git a/cpp/tests/utilities/test_graphs.hpp b/cpp/tests/utilities/test_graphs.hpp index cb34253b3fa..2d1089ab467 100644 --- a/cpp/tests/utilities/test_graphs.hpp +++ b/cpp/tests/utilities/test_graphs.hpp @@ -17,7 +17,7 @@ #include #include -#include // legacy coo_to_csr +#include // legacy coo_to_csr #include #include From 5cb9b479bceb9aeb5cd2e6f424541b806e7aae67 Mon Sep 17 00:00:00 2001 From: Seunghwa Kang Date: Mon, 18 Jul 2022 18:34:12 -0700 Subject: [PATCH 04/13] remove unused code --- cpp/include/cugraph/legacy/functions.hpp | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/cpp/include/cugraph/legacy/functions.hpp b/cpp/include/cugraph/legacy/functions.hpp index 23edd204c3b..5c9b566a817 100644 --- a/cpp/include/cugraph/legacy/functions.hpp +++ b/cpp/include/cugraph/legacy/functions.hpp @@ -44,24 +44,4 @@ std::unique_ptr> coo_to_csr( legacy::GraphCOOView const& graph, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); -/** - * @brief Broadcast using handle communicator - * - * Use handle's communicator to operate broadcasting. - * - * @throws cugraph::logic_error when an error occurs. - * - * @tparam value_t Type of the data to broadcast - * - * @param[out] value Point to the data - * @param[in] count Number of elements to broadcast - * - */ - -// FIXME: It would be better to expose it in RAFT -template -void comms_bcast(const raft::handle_t& handle, value_t* value, size_t count) -{ - handle.get_comms().bcast(value, count, 0, handle.get_stream()); -} } // namespace cugraph From 60f82e2af80a98c4ba18757d218e4a6fdd132c75 Mon Sep 17 00:00:00 2001 From: Seunghwa Kang Date: Tue, 19 Jul 2022 14:50:20 -0700 Subject: [PATCH 05/13] clang-format --- cpp/tests/utilities/matrix_market_file_utilities.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/tests/utilities/matrix_market_file_utilities.cu b/cpp/tests/utilities/matrix_market_file_utilities.cu index 8ec0c3c8843..0d17412f09a 100644 --- a/cpp/tests/utilities/matrix_market_file_utilities.cu +++ b/cpp/tests/utilities/matrix_market_file_utilities.cu @@ -17,8 +17,8 @@ #include #include -#include #include +#include #include #include From 1098af65f803eb73ed703d5e6be48ea1699ba918 Mon Sep 17 00:00:00 2001 From: Seunghwa Kang Date: Tue, 19 Jul 2022 15:18:21 -0700 Subject: [PATCH 06/13] move legacy code to the legacy directories --- cpp/CMakeLists.txt | 6 +++--- cpp/include/cugraph/algorithms.hpp | 2 +- cpp/include/cugraph/{ => legacy}/internals.hpp | 0 cpp/src/community/legacy/louvain.cuh | 2 +- cpp/src/components/{ => legacy}/connectivity.cu | 0 cpp/src/components/{ => legacy}/scc_matrix.cuh | 0 cpp/src/components/{ => legacy}/utils.h | 0 cpp/src/components/{ => legacy}/weak_cc.cuh | 0 cpp/src/converters/{ => legacy}/COOtoCSR.cu | 0 cpp/src/converters/{ => legacy}/COOtoCSR.cuh | 0 cpp/src/converters/permute_graph.cuh | 2 +- cpp/src/layout/{ => legacy}/barnes_hut.cuh | 4 ++-- cpp/src/layout/{ => legacy}/bh_kernels.cuh | 0 cpp/src/layout/{ => legacy}/exact_fa2.cuh | 4 ++-- cpp/src/layout/{ => legacy}/exact_repulsion.cuh | 0 cpp/src/layout/{ => legacy}/fa2_kernels.cuh | 0 cpp/src/layout/{ => legacy}/force_atlas2.cu | 0 cpp/src/layout/{ => legacy}/utils.hpp | 0 cpp/tests/components/con_comp_test.cu | 2 +- cpp/tests/components/scc_test.cu | 4 ++-- cpp/tests/tree/mst_test.cu | 2 +- 21 files changed, 14 insertions(+), 14 deletions(-) rename cpp/include/cugraph/{ => legacy}/internals.hpp (100%) rename cpp/src/components/{ => legacy}/connectivity.cu (100%) rename cpp/src/components/{ => legacy}/scc_matrix.cuh (100%) rename cpp/src/components/{ => legacy}/utils.h (100%) rename cpp/src/components/{ => legacy}/weak_cc.cuh (100%) rename cpp/src/converters/{ => legacy}/COOtoCSR.cu (100%) rename cpp/src/converters/{ => legacy}/COOtoCSR.cuh (100%) rename cpp/src/layout/{ => legacy}/barnes_hut.cuh (99%) rename cpp/src/layout/{ => legacy}/bh_kernels.cuh (100%) rename cpp/src/layout/{ => legacy}/exact_fa2.cuh (98%) rename cpp/src/layout/{ => legacy}/exact_repulsion.cuh (100%) rename cpp/src/layout/{ => legacy}/fa2_kernels.cuh (100%) rename cpp/src/layout/{ => legacy}/force_atlas2.cu (100%) rename cpp/src/layout/{ => legacy}/utils.hpp (100%) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 913aab7bd5a..1e85edb8474 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -182,8 +182,8 @@ set(CUGRAPH_SOURCES src/traversal/legacy/bfs.cu src/link_prediction/jaccard.cu src/link_prediction/overlap.cu - src/layout/force_atlas2.cu - src/converters/COOtoCSR.cu + src/layout/legacy/force_atlas2.cu + src/converters/legacy/COOtoCSR.cu src/community/legacy/spectral_clustering.cu src/community/louvain_sg.cu src/community/louvain_mg.cu @@ -203,7 +203,7 @@ set(CUGRAPH_SOURCES src/cores/core_number_sg.cu src/cores/core_number_mg.cu src/traversal/two_hop_neighbors.cu - src/components/connectivity.cu + src/components/legacy/connectivity.cu src/centrality/betweenness_centrality.cu src/generators/generate_rmat_edgelist.cu src/generators/generator_tools.cu diff --git a/cpp/include/cugraph/algorithms.hpp b/cpp/include/cugraph/algorithms.hpp index e4eb5f7030f..4c3fb4164c4 100644 --- a/cpp/include/cugraph/algorithms.hpp +++ b/cpp/include/cugraph/algorithms.hpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include #ifndef NO_CUGRAPH_OPS diff --git a/cpp/include/cugraph/internals.hpp b/cpp/include/cugraph/legacy/internals.hpp similarity index 100% rename from cpp/include/cugraph/internals.hpp rename to cpp/include/cugraph/legacy/internals.hpp diff --git a/cpp/src/community/legacy/louvain.cuh b/cpp/src/community/legacy/louvain.cuh index 375e65bf87b..fc2f1ede1aa 100644 --- a/cpp/src/community/legacy/louvain.cuh +++ b/cpp/src/community/legacy/louvain.cuh @@ -17,7 +17,7 @@ #include -#include +#include #include #include diff --git a/cpp/src/components/connectivity.cu b/cpp/src/components/legacy/connectivity.cu similarity index 100% rename from cpp/src/components/connectivity.cu rename to cpp/src/components/legacy/connectivity.cu diff --git a/cpp/src/components/scc_matrix.cuh b/cpp/src/components/legacy/scc_matrix.cuh similarity index 100% rename from cpp/src/components/scc_matrix.cuh rename to cpp/src/components/legacy/scc_matrix.cuh diff --git a/cpp/src/components/utils.h b/cpp/src/components/legacy/utils.h similarity index 100% rename from cpp/src/components/utils.h rename to cpp/src/components/legacy/utils.h diff --git a/cpp/src/components/weak_cc.cuh b/cpp/src/components/legacy/weak_cc.cuh similarity index 100% rename from cpp/src/components/weak_cc.cuh rename to cpp/src/components/legacy/weak_cc.cuh diff --git a/cpp/src/converters/COOtoCSR.cu b/cpp/src/converters/legacy/COOtoCSR.cu similarity index 100% rename from cpp/src/converters/COOtoCSR.cu rename to cpp/src/converters/legacy/COOtoCSR.cu diff --git a/cpp/src/converters/COOtoCSR.cuh b/cpp/src/converters/legacy/COOtoCSR.cuh similarity index 100% rename from cpp/src/converters/COOtoCSR.cuh rename to cpp/src/converters/legacy/COOtoCSR.cuh diff --git a/cpp/src/converters/permute_graph.cuh b/cpp/src/converters/permute_graph.cuh index 01a8f219f4e..1bab264d91c 100644 --- a/cpp/src/converters/permute_graph.cuh +++ b/cpp/src/converters/permute_graph.cuh @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "converters/COOtoCSR.cuh" +#include "converters/legacy/COOtoCSR.cuh" #include #include #include diff --git a/cpp/src/layout/barnes_hut.cuh b/cpp/src/layout/legacy/barnes_hut.cuh similarity index 99% rename from cpp/src/layout/barnes_hut.cuh rename to cpp/src/layout/legacy/barnes_hut.cuh index bd191bd9772..f3cd359f0b8 100644 --- a/cpp/src/layout/barnes_hut.cuh +++ b/cpp/src/layout/legacy/barnes_hut.cuh @@ -20,11 +20,11 @@ #include "fa2_kernels.cuh" #include "utils.hpp" -#include +#include #include #include -#include +#include #include #include diff --git a/cpp/src/layout/bh_kernels.cuh b/cpp/src/layout/legacy/bh_kernels.cuh similarity index 100% rename from cpp/src/layout/bh_kernels.cuh rename to cpp/src/layout/legacy/bh_kernels.cuh diff --git a/cpp/src/layout/exact_fa2.cuh b/cpp/src/layout/legacy/exact_fa2.cuh similarity index 98% rename from cpp/src/layout/exact_fa2.cuh rename to cpp/src/layout/legacy/exact_fa2.cuh index b30a5993370..007724a7211 100644 --- a/cpp/src/layout/exact_fa2.cuh +++ b/cpp/src/layout/legacy/exact_fa2.cuh @@ -19,10 +19,10 @@ #include #include -#include +#include #include -#include +#include #include #include diff --git a/cpp/src/layout/exact_repulsion.cuh b/cpp/src/layout/legacy/exact_repulsion.cuh similarity index 100% rename from cpp/src/layout/exact_repulsion.cuh rename to cpp/src/layout/legacy/exact_repulsion.cuh diff --git a/cpp/src/layout/fa2_kernels.cuh b/cpp/src/layout/legacy/fa2_kernels.cuh similarity index 100% rename from cpp/src/layout/fa2_kernels.cuh rename to cpp/src/layout/legacy/fa2_kernels.cuh diff --git a/cpp/src/layout/force_atlas2.cu b/cpp/src/layout/legacy/force_atlas2.cu similarity index 100% rename from cpp/src/layout/force_atlas2.cu rename to cpp/src/layout/legacy/force_atlas2.cu diff --git a/cpp/src/layout/utils.hpp b/cpp/src/layout/legacy/utils.hpp similarity index 100% rename from cpp/src/layout/utils.hpp rename to cpp/src/layout/legacy/utils.hpp diff --git a/cpp/tests/components/con_comp_test.cu b/cpp/tests/components/con_comp_test.cu index 9cbb8e63775..a4b68ca7ee7 100644 --- a/cpp/tests/components/con_comp_test.cu +++ b/cpp/tests/components/con_comp_test.cu @@ -20,7 +20,7 @@ #include -#include +#include #include #include diff --git a/cpp/tests/components/scc_test.cu b/cpp/tests/components/scc_test.cu index 400464053f4..7418ecc6601 100644 --- a/cpp/tests/components/scc_test.cu +++ b/cpp/tests/components/scc_test.cu @@ -18,8 +18,8 @@ #include -#include -#include +#include +#include #include #include #include diff --git a/cpp/tests/tree/mst_test.cu b/cpp/tests/tree/mst_test.cu index 4afb1ad6b69..75122e20451 100644 --- a/cpp/tests/tree/mst_test.cu +++ b/cpp/tests/tree/mst_test.cu @@ -31,7 +31,7 @@ #include -#include "../src/converters/COOtoCSR.cuh" +#include "../src/converters/legacy/COOtoCSR.cuh" #include #include #include From 13601f840eaa0b5fc0b3a2fe66bece59a947235d Mon Sep 17 00:00:00 2001 From: Seunghwa Kang Date: Tue, 19 Jul 2022 15:27:53 -0700 Subject: [PATCH 07/13] delete unused permute_graph.cuh --- cpp/src/community/legacy/ecg.cu | 1 - cpp/src/converters/permute_graph.cuh | 96 ---------------------------- 2 files changed, 97 deletions(-) delete mode 100644 cpp/src/converters/permute_graph.cuh diff --git a/cpp/src/community/legacy/ecg.cu b/cpp/src/community/legacy/ecg.cu index da519158890..78c3412f16a 100644 --- a/cpp/src/community/legacy/ecg.cu +++ b/cpp/src/community/legacy/ecg.cu @@ -15,7 +15,6 @@ */ #include -#include #include #include #include diff --git a/cpp/src/converters/permute_graph.cuh b/cpp/src/converters/permute_graph.cuh deleted file mode 100644 index 1bab264d91c..00000000000 --- a/cpp/src/converters/permute_graph.cuh +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2019-2022, NVIDIA CORPORATION. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "converters/legacy/COOtoCSR.cuh" -#include -#include -#include -#include -#include - -#include -#include - -namespace cugraph { -namespace detail { - -template -struct permutation_functor { - IdxT const* permutation; - permutation_functor(IdxT const* p) : permutation(p) {} - __host__ __device__ IdxT operator()(IdxT in) const { return permutation[in]; } -}; - -/** - * This function takes a graph and a permutation vector and permutes the - * graph according to the permutation vector. So each vertex id i becomes - * vertex id permutation[i] in the permuted graph. - * - * @param graph The graph to permute. - * @param permutation The permutation vector to use, must be a valid permutation - * i.e. contains all values 0-n exactly once. - * @param result View of the resulting graph... note this should be pre allocated - * and number_of_vertices and number_of_edges should be set - * @return The permuted graph. - */ -template -void permute_graph(legacy::GraphCSRView const& graph, - vertex_t const* permutation, - legacy::GraphCSRView result, - cudaStream_t stream = 0) -{ - // Create a COO out of the CSR - rmm::device_vector src_vertices_v(graph.number_of_edges); - rmm::device_vector dst_vertices_v(graph.number_of_edges); - rmm::device_vector weights_v(graph.number_of_edges); - - vertex_t* d_src = src_vertices_v.data().get(); - vertex_t* d_dst = dst_vertices_v.data().get(); - weight_t* d_weights = weights_v.data().get(); - - graph.get_source_indices(d_src); - - if (graph.has_data()) - thrust::copy(rmm::exec_policy(stream), - graph.edge_data, - graph.edge_data + graph.number_of_edges, - d_weights); - - // Permute the src_indices - permutation_functor pf(permutation); - thrust::transform(rmm::exec_policy(stream), d_src, d_src + graph.number_of_edges, d_src, pf); - - // Permute the destination indices - thrust::transform( - rmm::exec_policy(stream), graph.indices, graph.indices + graph.number_of_edges, d_dst, pf); - - legacy::GraphCOOView graph_coo; - - graph_coo.number_of_vertices = graph.number_of_vertices; - graph_coo.number_of_edges = graph.number_of_edges; - graph_coo.src_indices = d_src; - graph_coo.dst_indices = d_dst; - - if (graph.has_data()) { - graph_coo.edge_data = d_weights; - } else { - graph_coo.edge_data = nullptr; - } - - cugraph::coo_to_csr_inplace(graph_coo, result); -} - -} // namespace detail -} // namespace cugraph From 6ad0dccc0972f4743f292eda755122c022ec6c06 Mon Sep 17 00:00:00 2001 From: Seunghwa Kang Date: Tue, 19 Jul 2022 15:31:23 -0700 Subject: [PATCH 08/13] clang-format --- cpp/include/cugraph/algorithms.hpp | 2 +- cpp/src/community/legacy/louvain.cu | 1 - cpp/src/layout/legacy/barnes_hut.cuh | 2 +- cpp/src/layout/legacy/exact_fa2.cuh | 2 +- cpp/tests/utilities/test_graphs.hpp | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cpp/include/cugraph/algorithms.hpp b/cpp/include/cugraph/algorithms.hpp index 4c3fb4164c4..ef7c9a4fd61 100644 --- a/cpp/include/cugraph/algorithms.hpp +++ b/cpp/include/cugraph/algorithms.hpp @@ -21,8 +21,8 @@ #include #include -#include #include +#include #ifndef NO_CUGRAPH_OPS #include diff --git a/cpp/src/community/legacy/louvain.cu b/cpp/src/community/legacy/louvain.cu index 742cf1f6cdc..b1d67a0d9db 100644 --- a/cpp/src/community/legacy/louvain.cu +++ b/cpp/src/community/legacy/louvain.cu @@ -122,4 +122,3 @@ template std::pair louvain(raft::handle_t const&, size_t, double); } // namespace cugraph - diff --git a/cpp/src/layout/legacy/barnes_hut.cuh b/cpp/src/layout/legacy/barnes_hut.cuh index f3cd359f0b8..4018466cfda 100644 --- a/cpp/src/layout/legacy/barnes_hut.cuh +++ b/cpp/src/layout/legacy/barnes_hut.cuh @@ -24,8 +24,8 @@ #include #include -#include #include +#include #include #include diff --git a/cpp/src/layout/legacy/exact_fa2.cuh b/cpp/src/layout/legacy/exact_fa2.cuh index 007724a7211..e9125c84105 100644 --- a/cpp/src/layout/legacy/exact_fa2.cuh +++ b/cpp/src/layout/legacy/exact_fa2.cuh @@ -22,8 +22,8 @@ #include #include -#include #include +#include #include #include diff --git a/cpp/tests/utilities/test_graphs.hpp b/cpp/tests/utilities/test_graphs.hpp index 2d1089ab467..88c7c61f963 100644 --- a/cpp/tests/utilities/test_graphs.hpp +++ b/cpp/tests/utilities/test_graphs.hpp @@ -17,9 +17,9 @@ #include #include -#include // legacy coo_to_csr #include #include +#include // legacy coo_to_csr #include #include From 934725dd9e325727f6fcfc973ad0f3d15b653b08 Mon Sep 17 00:00:00 2001 From: Seunghwa Kang Date: Tue, 19 Jul 2022 15:34:08 -0700 Subject: [PATCH 09/13] copyright --- cpp/include/cugraph/legacy/functions.hpp | 2 +- cpp/include/cugraph/legacy/internals.hpp | 2 +- cpp/src/converters/legacy/COOtoCSR.cu | 2 +- cpp/src/layout/legacy/bh_kernels.cuh | 2 +- cpp/src/layout/legacy/force_atlas2.cu | 2 +- cpp/tests/components/con_comp_test.cu | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cpp/include/cugraph/legacy/functions.hpp b/cpp/include/cugraph/legacy/functions.hpp index 5c9b566a817..57da9fbe677 100644 --- a/cpp/include/cugraph/legacy/functions.hpp +++ b/cpp/include/cugraph/legacy/functions.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021, NVIDIA CORPORATION. + * Copyright (c) 2020-2022, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cpp/include/cugraph/legacy/internals.hpp b/cpp/include/cugraph/legacy/internals.hpp index 1c311304ae4..f59c40b6076 100644 --- a/cpp/include/cugraph/legacy/internals.hpp +++ b/cpp/include/cugraph/legacy/internals.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021, NVIDIA CORPORATION. + * Copyright (c) 2020-2022, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cpp/src/converters/legacy/COOtoCSR.cu b/cpp/src/converters/legacy/COOtoCSR.cu index 59c641b59a7..5e8e1604586 100644 --- a/cpp/src/converters/legacy/COOtoCSR.cu +++ b/cpp/src/converters/legacy/COOtoCSR.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021, NVIDIA CORPORATION. + * Copyright (c) 2020-2022, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cpp/src/layout/legacy/bh_kernels.cuh b/cpp/src/layout/legacy/bh_kernels.cuh index 8dbc08a6440..5b101363314 100644 --- a/cpp/src/layout/legacy/bh_kernels.cuh +++ b/cpp/src/layout/legacy/bh_kernels.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021, NVIDIA CORPORATION. + * Copyright (c) 2020-2022, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cpp/src/layout/legacy/force_atlas2.cu b/cpp/src/layout/legacy/force_atlas2.cu index 9dc4ee286b0..d23642b8ae4 100644 --- a/cpp/src/layout/legacy/force_atlas2.cu +++ b/cpp/src/layout/legacy/force_atlas2.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021, NVIDIA CORPORATION. + * Copyright (c) 2020-2022, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cpp/tests/components/con_comp_test.cu b/cpp/tests/components/con_comp_test.cu index a4b68ca7ee7..e65ead2ca24 100644 --- a/cpp/tests/components/con_comp_test.cu +++ b/cpp/tests/components/con_comp_test.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2021, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation From 6d549480f42a8957bf5a10c96cf7b74e9f94b7cc Mon Sep 17 00:00:00 2001 From: Seunghwa Kang Date: Wed, 20 Jul 2022 11:50:05 -0700 Subject: [PATCH 10/13] fix build error --- python/cugraph/cugraph/structure/utils.pxd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/cugraph/cugraph/structure/utils.pxd b/python/cugraph/cugraph/structure/utils.pxd index 350b5890149..687109215bd 100644 --- a/python/cugraph/cugraph/structure/utils.pxd +++ b/python/cugraph/cugraph/structure/utils.pxd @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2021, NVIDIA CORPORATION. +# Copyright (c) 2019-2022, NVIDIA CORPORATION. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -20,7 +20,7 @@ from cugraph.structure.graph_primtypes cimport * from libcpp.memory cimport unique_ptr -cdef extern from "cugraph/functions.hpp" namespace "cugraph": +cdef extern from "cugraph/legacy/functions.hpp" namespace "cugraph": cdef unique_ptr[GraphCSR[VT,ET,WT]] coo_to_csr[VT,ET,WT]( const GraphCOOView[VT,ET,WT] &graph) except + From 14c57c10fc3cb1552a8f058febe1223255dbbb42 Mon Sep 17 00:00:00 2001 From: Seunghwa Kang Date: Thu, 21 Jul 2022 10:36:12 -0700 Subject: [PATCH 11/13] undelete the comms_bcast (this is used by python) --- cpp/include/cugraph/legacy/functions.hpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/cpp/include/cugraph/legacy/functions.hpp b/cpp/include/cugraph/legacy/functions.hpp index 57da9fbe677..875c92df24d 100644 --- a/cpp/include/cugraph/legacy/functions.hpp +++ b/cpp/include/cugraph/legacy/functions.hpp @@ -44,4 +44,25 @@ std::unique_ptr> coo_to_csr( legacy::GraphCOOView const& graph, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); +/** + * @brief Broadcast using handle communicator + * + * Use handle's communicator to operate broadcasting. + * + * @throws cugraph::logic_error when an error occurs. + * + * @tparam value_t Type of the data to broadcast + * + * @param[out] value Point to the data + * @param[in] count Number of elements to broadcast + * + */ + +// FIXME: It would be better to expose it in RAFT +template +void comms_bcast(const raft::handle_t& handle, value_t* value, size_t count) +{ + handle.get_comms().bcast(value, count, 0, handle.get_stream()); +} + } // namespace cugraph From 367285c5352f6cf2a910072dd528345e3b759d2b Mon Sep 17 00:00:00 2001 From: Seunghwa Kang Date: Thu, 21 Jul 2022 10:56:26 -0700 Subject: [PATCH 12/13] adjust include paths --- python/cugraph/cugraph/internals/callbacks_implems.hpp | 2 +- python/cugraph/cugraph/layout/force_atlas2.pxd | 2 +- python/cugraph/cugraph/layout/force_atlas2_wrapper.pyx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/cugraph/cugraph/internals/callbacks_implems.hpp b/python/cugraph/cugraph/internals/callbacks_implems.hpp index 79fab937965..dd65f81489f 100644 --- a/python/cugraph/cugraph/internals/callbacks_implems.hpp +++ b/python/cugraph/cugraph/internals/callbacks_implems.hpp @@ -17,7 +17,7 @@ #pragma once #include -#include +#include #include diff --git a/python/cugraph/cugraph/layout/force_atlas2.pxd b/python/cugraph/cugraph/layout/force_atlas2.pxd index 5496d1b655e..998f7c09352 100644 --- a/python/cugraph/cugraph/layout/force_atlas2.pxd +++ b/python/cugraph/cugraph/layout/force_atlas2.pxd @@ -19,7 +19,7 @@ from cugraph.structure.graph_primtypes cimport * from libcpp cimport bool -cdef extern from "cugraph/internals.hpp" namespace "cugraph::internals": +cdef extern from "cugraph/legacy/internals.hpp" namespace "cugraph::internals": cdef cppclass GraphBasedDimRedCallback cdef extern from "cugraph/algorithms.hpp" namespace "cugraph": diff --git a/python/cugraph/cugraph/layout/force_atlas2_wrapper.pyx b/python/cugraph/cugraph/layout/force_atlas2_wrapper.pyx index 1644875f034..9c94772a3a8 100644 --- a/python/cugraph/cugraph/layout/force_atlas2_wrapper.pyx +++ b/python/cugraph/cugraph/layout/force_atlas2_wrapper.pyx @@ -25,7 +25,7 @@ import cudf from numba import cuda import numpy as np -cdef extern from "cugraph/internals.hpp" namespace "cugraph::internals": +cdef extern from "cugraph/legacy/internals.hpp" namespace "cugraph::internals": cdef cppclass GraphBasedDimRedCallback From 1860582d0712949cd8ab482b4a9a466543a4b1fe Mon Sep 17 00:00:00 2001 From: Seunghwa Kang Date: Thu, 21 Jul 2022 11:01:00 -0700 Subject: [PATCH 13/13] copyright year --- python/cugraph/cugraph/internals/callbacks_implems.hpp | 2 +- python/cugraph/cugraph/layout/force_atlas2.pxd | 2 +- python/cugraph/cugraph/layout/force_atlas2_wrapper.pyx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/cugraph/cugraph/internals/callbacks_implems.hpp b/python/cugraph/cugraph/internals/callbacks_implems.hpp index dd65f81489f..10a8fc7503a 100644 --- a/python/cugraph/cugraph/internals/callbacks_implems.hpp +++ b/python/cugraph/cugraph/internals/callbacks_implems.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021, NVIDIA CORPORATION. + * Copyright (c) 2020-2022, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/python/cugraph/cugraph/layout/force_atlas2.pxd b/python/cugraph/cugraph/layout/force_atlas2.pxd index 998f7c09352..3112faf6d96 100644 --- a/python/cugraph/cugraph/layout/force_atlas2.pxd +++ b/python/cugraph/cugraph/layout/force_atlas2.pxd @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2021, NVIDIA CORPORATION. +# Copyright (c) 2020-2022, NVIDIA CORPORATION. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/python/cugraph/cugraph/layout/force_atlas2_wrapper.pyx b/python/cugraph/cugraph/layout/force_atlas2_wrapper.pyx index 9c94772a3a8..73de7415971 100644 --- a/python/cugraph/cugraph/layout/force_atlas2_wrapper.pyx +++ b/python/cugraph/cugraph/layout/force_atlas2_wrapper.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2021, NVIDIA CORPORATION. +# Copyright (c) 2020-2022, NVIDIA CORPORATION. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at