From ec43b2149ad4f6adac22e9ebfa4390cf6d5efc56 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Thu, 29 Aug 2024 17:49:11 -0500 Subject: [PATCH 1/3] Fix build strings in nx-cugraph (#4639) Build strings aren't being published correctly for `nx-cugraph` (see missing info in current nightlies: https://anaconda.org/rapidsai-nightly/nx-cugraph/files). This is due to a formatting or copy-paste problem in the `meta.yaml` recipe file. This PR fixes the problem. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - James Lamb (https://github.com/jameslamb) URL: https://github.com/rapidsai/cugraph/pull/4639 --- conda/recipes/nx-cugraph/meta.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/conda/recipes/nx-cugraph/meta.yaml b/conda/recipes/nx-cugraph/meta.yaml index d67287be757..263f53d9a8f 100644 --- a/conda/recipes/nx-cugraph/meta.yaml +++ b/conda/recipes/nx-cugraph/meta.yaml @@ -14,9 +14,7 @@ source: build: number: {{ GIT_DESCRIBE_NUMBER }} - build: - number: {{ GIT_DESCRIBE_NUMBER }} - string: py{{ py_version }}_{{ date_string }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} + string: py{{ py_version }}_{{ date_string }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} requirements: host: From 65e23480ab6b33be84acfc6f16e7c5fcc24b3de9 Mon Sep 17 00:00:00 2001 From: Chuck Hastings <45364586+ChuckHastings@users.noreply.github.com> Date: Thu, 29 Aug 2024 21:00:59 -0400 Subject: [PATCH 2/3] Update examples to build with latest changes to cugraph (#4632) We don't build the examples as part of CI. Some changes were made to the cugraph functions that cause the examples to be out of date. Also, we should release the RAFT handle before calling MPI_Finalize. Authors: - Chuck Hastings (https://github.com/ChuckHastings) Approvers: - Seunghwa Kang (https://github.com/seunghwak) URL: https://github.com/rapidsai/cugraph/pull/4632 --- .../graph_operations/graph_operations.cu | 10 +++++----- .../vertex_and_edge_partition.cu | 2 +- .../multi_gpu_application/mg_graph_algorithms.cpp | 15 ++++++++++++--- cpp/include/cugraph/graph_functions.hpp | 3 ++- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/cpp/examples/developers/graph_operations/graph_operations.cu b/cpp/examples/developers/graph_operations/graph_operations.cu index 014cedcab7e..912f9f1fd46 100644 --- a/cpp/examples/developers/graph_operations/graph_operations.cu +++ b/cpp/examples/developers/graph_operations/graph_operations.cu @@ -131,7 +131,7 @@ create_graph(raft::handle_t const& handle, // if (multi_gpu) { - std::tie(d_edge_srcs, d_edge_dsts, d_edge_wgts, std::ignore, std::ignore) = + std::tie(d_edge_srcs, d_edge_dsts, d_edge_wgts, std::ignore, std::ignore, std::ignore) = cugraph::shuffle_external_edges(handle, std::move(d_edge_srcs), std::move(d_edge_dsts), @@ -215,10 +215,10 @@ void perform_example_graph_operations( graph_view); cugraph::update_edge_src_property( - handle, graph_view, vertex_weights.begin(), src_vertex_weights_cache); + handle, graph_view, vertex_weights.begin(), src_vertex_weights_cache.mutable_view()); cugraph::update_edge_dst_property( - handle, graph_view, vertex_weights.begin(), dst_vertex_weights_cache); + handle, graph_view, vertex_weights.begin(), dst_vertex_weights_cache.mutable_view()); rmm::device_uvector weighted_averages( size_of_the_vertex_partition_assigned_to_this_process, handle.get_stream()); @@ -259,10 +259,10 @@ void perform_example_graph_operations( graph_view); cugraph::update_edge_src_property( - handle, graph_view, vertex_weights.begin(), src_vertex_weights_cache); + handle, graph_view, vertex_weights.begin(), src_vertex_weights_cache.mutable_view()); cugraph::update_edge_dst_property( - handle, graph_view, vertex_weights.begin(), dst_vertex_weights_cache); + handle, graph_view, vertex_weights.begin(), dst_vertex_weights_cache.mutable_view()); rmm::device_uvector weighted_averages( size_of_the_vertex_partition_assigned_to_this_process, handle.get_stream()); diff --git a/cpp/examples/developers/vertex_and_edge_partition/vertex_and_edge_partition.cu b/cpp/examples/developers/vertex_and_edge_partition/vertex_and_edge_partition.cu index ce02e3b2639..c261ff6d843 100644 --- a/cpp/examples/developers/vertex_and_edge_partition/vertex_and_edge_partition.cu +++ b/cpp/examples/developers/vertex_and_edge_partition/vertex_and_edge_partition.cu @@ -127,7 +127,7 @@ create_graph(raft::handle_t const& handle, // if (multi_gpu) { - std::tie(d_edge_srcs, d_edge_dsts, d_edge_wgts, std::ignore, std::ignore) = + std::tie(d_edge_srcs, d_edge_dsts, d_edge_wgts, std::ignore, std::ignore, std::ignore) = cugraph::shuffle_external_edges(handle, std::move(d_edge_srcs), std::move(d_edge_dsts), diff --git a/cpp/examples/users/multi_gpu_application/mg_graph_algorithms.cpp b/cpp/examples/users/multi_gpu_application/mg_graph_algorithms.cpp index a9e2a170208..db629117604 100644 --- a/cpp/examples/users/multi_gpu_application/mg_graph_algorithms.cpp +++ b/cpp/examples/users/multi_gpu_application/mg_graph_algorithms.cpp @@ -123,7 +123,7 @@ create_graph(raft::handle_t const& handle, // if (multi_gpu) { - std::tie(d_edge_srcs, d_edge_dsts, d_edge_wgts, std::ignore, std::ignore) = + std::tie(d_edge_srcs, d_edge_dsts, d_edge_wgts, std::ignore, std::ignore, std::ignore) = cugraph::shuffle_external_edges(handle, std::move(d_edge_srcs), std::move(d_edge_dsts), @@ -248,9 +248,8 @@ void run_graph_algorithms( std::cout); } -int main(int argc, char** argv) +void run_tests() { - initialize_mpi_and_set_device(argc, argv); std::unique_ptr handle = initialize_mg_handle(); // @@ -279,6 +278,7 @@ int main(int argc, char** argv) std::move(std::make_optional(edge_wgts)), renumber, is_symmetric); + // Non-owning view of the graph object auto graph_view = graph.view(); @@ -292,5 +292,14 @@ int main(int argc, char** argv) run_graph_algorithms( *handle, graph_view, edge_weight_view); + handle.release(); +} + +int main(int argc, char** argv) +{ + initialize_mpi_and_set_device(argc, argv); + + run_tests(); + RAFT_MPI_TRY(MPI_Finalize()); } diff --git a/cpp/include/cugraph/graph_functions.hpp b/cpp/include/cugraph/graph_functions.hpp index e1364f69991..7f6543ccab8 100644 --- a/cpp/include/cugraph/graph_functions.hpp +++ b/cpp/include/cugraph/graph_functions.hpp @@ -1178,7 +1178,8 @@ std::tuple, rmm::device_uvector, std::optional>, std::optional>, - std::optional>> + std::optional>, + std::vector> shuffle_external_edges(raft::handle_t const& handle, rmm::device_uvector&& edge_srcs, rmm::device_uvector&& edge_dsts, From d5154d5d65d72a7699cf39c2443fa60027b7177b Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 29 Aug 2024 20:32:15 -0500 Subject: [PATCH 3/3] update a few more Python references to Python 3.10 (#4637) Contributes to https://github.com/rapidsai/build-planning/issues/88. #4625 dropped Python 3.9 support here (as part of the RAPIDS-wide effort to drop Python 3.9 in this release). This PR fixes a few things that were missed in that PR. Authors: - James Lamb (https://github.com/jameslamb) - https://github.com/jakirkham Approvers: - Don Acosta (https://github.com/acostadon) - https://github.com/jakirkham - Bradley Dice (https://github.com/bdice) - Mike Sarahan (https://github.com/msarahan) - Alex Barghi (https://github.com/alexbarghi-nv) - Rick Ratzel (https://github.com/rlratzel) URL: https://github.com/rapidsai/cugraph/pull/4637 --- .pre-commit-config.yaml | 2 +- docs/cugraph/source/installation/source_build.md | 5 ++--- docs/cugraph/source/tutorials/cugraph_notebooks.md | 5 ++--- docs/cugraph/source/wholegraph/installation/source_build.md | 5 ++--- notebooks/README.md | 5 ++--- python/nx-cugraph/lint.yaml | 2 +- 6 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6f631e40c2f..5b351478fa9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,7 +17,7 @@ repos: hooks: - id: black language_version: python3 - args: [--target-version=py39] + args: [--target-version=py310] files: ^(python/.*|benchmarks/.*)$ exclude: ^python/nx-cugraph/ - repo: https://github.com/PyCQA/flake8 diff --git a/docs/cugraph/source/installation/source_build.md b/docs/cugraph/source/installation/source_build.md index 89e63badef8..80f2d97d40d 100644 --- a/docs/cugraph/source/installation/source_build.md +++ b/docs/cugraph/source/installation/source_build.md @@ -12,8 +12,7 @@ __Compilers:__ * `nvcc` version 11.5+ __CUDA:__ -* CUDA 11.2+ -* NVIDIA driver 470.42.01 or newer +* CUDA 11.8+ * NVIDIA GPU, Volta architecture or later, with [compute capability](https://developer.nvidia.com/cuda-gpus) 7.0+ Further details and download links for these prerequisites are available on the @@ -178,7 +177,7 @@ Run either the C++ or the Python tests with datasets make test ``` -Note: This conda installation only applies to Linux and Python versions 3.8/3.11. +Note: This conda installation only applies to Linux and Python versions 3.10 and 3.11. ### (OPTIONAL) Set environment variable on activation diff --git a/docs/cugraph/source/tutorials/cugraph_notebooks.md b/docs/cugraph/source/tutorials/cugraph_notebooks.md index 559ba36e97e..6d7840dc3c4 100644 --- a/docs/cugraph/source/tutorials/cugraph_notebooks.md +++ b/docs/cugraph/source/tutorials/cugraph_notebooks.md @@ -55,10 +55,9 @@ Running the example in these notebooks requires: * Download via Docker, Conda (See [__Getting Started__](https://rapids.ai/start.html)) * cuGraph is dependent on the latest version of cuDF. Please install all components of RAPIDS -* Python 3.8+ -* A system with an NVIDIA GPU: Pascal architecture or better +* Python 3.10+ +* A system with an NVIDIA GPU: Volta architecture or newer * CUDA 11.4+ -* NVIDIA driver 450.51+ ## Copyright diff --git a/docs/cugraph/source/wholegraph/installation/source_build.md b/docs/cugraph/source/wholegraph/installation/source_build.md index a7727ac4052..33d7c98b28e 100644 --- a/docs/cugraph/source/wholegraph/installation/source_build.md +++ b/docs/cugraph/source/wholegraph/installation/source_build.md @@ -16,8 +16,7 @@ __Compiler__: __CUDA__: * CUDA 11.8+ -* NVIDIA driver 450.80.02+ -* Pascal architecture or better +* Volta architecture or better You can obtain CUDA from [https://developer.nvidia.com/cuda-downloads](https://developer.nvidia.com/cuda-downloads). @@ -177,7 +176,7 @@ Run either the C++ or the Python tests with datasets ``` -Note: This conda installation only applies to Linux and Python versions 3.8/3.10. +Note: This conda installation only applies to Linux and Python versions 3.10 and 3.11. ## Creating documentation diff --git a/notebooks/README.md b/notebooks/README.md index 06ab93688ec..a8f094c340b 100644 --- a/notebooks/README.md +++ b/notebooks/README.md @@ -56,10 +56,9 @@ Running the example in these notebooks requires: * Download via Docker, Conda (See [__Getting Started__](https://rapids.ai/start.html)) * cuGraph is dependent on the latest version of cuDF. Please install all components of RAPIDS -* Python 3.8+ -* A system with an NVIDIA GPU: Pascal architecture or better +* Python 3.10+ +* A system with an NVIDIA GPU: Volta architecture or newer * CUDA 11.4+ -* NVIDIA driver 450.51+ ### QuickStart diff --git a/python/nx-cugraph/lint.yaml b/python/nx-cugraph/lint.yaml index ce46360e234..b2184a185c4 100644 --- a/python/nx-cugraph/lint.yaml +++ b/python/nx-cugraph/lint.yaml @@ -43,7 +43,7 @@ repos: rev: v3.16.0 hooks: - id: pyupgrade - args: [--py39-plus] + args: [--py310-plus] - repo: https://github.com/psf/black rev: 24.4.2 hooks: