Skip to content

Commit 0414984

Browse files
authored
Merge branch 'rapidsai:branch-24.06' into basic_tutorial
2 parents ff09b77 + ddfaacf commit 0414984

96 files changed

Lines changed: 3482 additions & 1029 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/cuda11.8-conda/devcontainer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
"BASE": "rapidsai/devcontainers:24.06-cpp-cuda11.8-mambaforge-ubuntu22.04"
99
}
1010
},
11+
"runArgs": [
12+
"--rm",
13+
"--name",
14+
"${localEnv:USER}-rapids-${localWorkspaceFolderBasename}-24.06-cuda11.8-conda"
15+
],
1116
"hostRequirements": {"gpu": "optional"},
1217
"features": {
1318
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.6": {}

.devcontainer/cuda11.8-pip/devcontainer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@
88
"BASE": "rapidsai/devcontainers:24.06-cpp-cuda11.8-ubuntu22.04"
99
}
1010
},
11+
"runArgs": [
12+
"--rm",
13+
"--name",
14+
"${localEnv:USER}-rapids-${localWorkspaceFolderBasename}-24.06-cuda11.8-pip"
15+
],
1116
"hostRequirements": {"gpu": "optional"},
1217
"features": {
1318
"ghcr.io/rapidsai/devcontainers/features/ucx:24.6": {
14-
"version": "1.14.1"
19+
"version": "1.15.0"
1520
},
1621
"ghcr.io/rapidsai/devcontainers/features/cuda:24.6": {
1722
"version": "11.8",

.devcontainer/cuda12.2-conda/devcontainer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
"BASE": "rapidsai/devcontainers:24.06-cpp-mambaforge-ubuntu22.04"
99
}
1010
},
11+
"runArgs": [
12+
"--rm",
13+
"--name",
14+
"${localEnv:USER}-rapids-${localWorkspaceFolderBasename}-24.06-cuda12.2-conda"
15+
],
1116
"hostRequirements": {"gpu": "optional"},
1217
"features": {
1318
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.6": {}

.devcontainer/cuda12.2-pip/devcontainer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@
88
"BASE": "rapidsai/devcontainers:24.06-cpp-cuda12.2-ubuntu22.04"
99
}
1010
},
11+
"runArgs": [
12+
"--rm",
13+
"--name",
14+
"${localEnv:USER}-rapids-${localWorkspaceFolderBasename}-24.06-cuda12.2-pip"
15+
],
1116
"hostRequirements": {"gpu": "optional"},
1217
"features": {
1318
"ghcr.io/rapidsai/devcontainers/features/ucx:24.6": {
14-
"version": "1.14.1"
19+
"version": "1.15.0"
1520
},
1621
"ghcr.io/rapidsai/devcontainers/features/cuda:24.6": {
1722
"version": "12.2",

ci/release/update-version.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ find .devcontainer/ -type f -name devcontainer.json -print0 | while IFS= read -r
105105
sed_runner "s@rapidsai/devcontainers/features/ucx:[0-9.]*@rapidsai/devcontainers/features/ucx:${NEXT_SHORT_TAG_PEP440}@" "${filename}"
106106
sed_runner "s@rapidsai/devcontainers/features/cuda:[0-9.]*@rapidsai/devcontainers/features/cuda:${NEXT_SHORT_TAG_PEP440}@" "${filename}"
107107
sed_runner "s@rapidsai/devcontainers/features/rapids-build-utils:[0-9.]*@rapidsai/devcontainers/features/rapids-build-utils:${NEXT_SHORT_TAG_PEP440}@" "${filename}"
108+
sed_runner "s@rapids-\${localWorkspaceFolderBasename}-[0-9.]*@rapids-\${localWorkspaceFolderBasename}-${NEXT_SHORT_TAG}@g" "${filename}"
108109
done
109110

110111
sed_runner "s/:[0-9][0-9]\.[0-9][0-9]/:${NEXT_SHORT_TAG}/" ./notebooks/README.md

ci/test_wheel_cugraph-pyg.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ else
3333
fi
3434
rapids-logger "Installing PyTorch and PyG dependencies"
3535
rapids-retry python -m pip install torch==2.1.0 --index-url ${PYTORCH_URL}
36-
rapids-retry python -m pip install torch-geometric==2.4.0
36+
rapids-retry python -m pip install "torch-geometric>=2.5,<2.6"
3737
rapids-retry python -m pip install \
3838
ogb \
3939
pyg_lib \

conda/recipes/cugraph-pyg/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ requirements:
3434
- cupy >=12.0.0
3535
- cugraph ={{ version }}
3636
- pylibcugraphops ={{ minor_version }}
37-
- pyg >=2.3,<2.5
37+
- pyg >=2.5,<2.6
3838

3939
tests:
4040
imports:

cpp/CMakeLists.txt

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,16 @@ rapids_find_package(CUDAToolkit REQUIRED
7777
INSTALL_EXPORT_SET cugraph-exports
7878
)
7979

80+
if (BUILD_CUGRAPH_MTMG_TESTS)
81+
if(NOT TARGET ucx::ucp)
82+
find_package(ucx REQUIRED)
83+
endif()
84+
85+
if(NOT TARGET ucxx::ucxx)
86+
find_package(ucxx REQUIRED)
87+
endif()
88+
endif()
89+
8090
set(CUGRAPH_C_FLAGS "")
8191
set(CUGRAPH_CXX_FLAGS "")
8292
set(CUGRAPH_CUDA_FLAGS "")
@@ -145,11 +155,6 @@ if(USE_CUGRAPH_OPS)
145155
include(cmake/thirdparty/get_libcugraphops.cmake)
146156
endif()
147157

148-
149-
if (BUILD_CUGRAPH_MTMG_TESTS)
150-
include(cmake/thirdparty/get_ucp.cmake)
151-
endif()
152-
153158
if(BUILD_TESTS)
154159
include(${rapids-cmake-dir}/cpm/gtest.cmake)
155160
rapids_cpm_gtest(BUILD_STATIC)
@@ -283,9 +288,12 @@ set(CUGRAPH_SOURCES
283288
src/structure/symmetrize_edgelist_mg.cu
284289
src/community/triangle_count_sg.cu
285290
src/community/triangle_count_mg.cu
291+
src/community/approx_weighted_matching_sg.cu
292+
src/community/approx_weighted_matching_mg.cu
286293
src/traversal/k_hop_nbrs_sg.cu
287294
src/traversal/k_hop_nbrs_mg.cu
288295
src/mtmg/vertex_result.cu
296+
src/mtmg/vertex_pairs_result.cu
289297
)
290298

291299
if(USE_CUGRAPH_OPS)

cpp/cmake/thirdparty/get_ucp.cmake

Lines changed: 0 additions & 35 deletions
This file was deleted.

cpp/include/cugraph/algorithms.hpp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2368,6 +2368,32 @@ rmm::device_uvector<vertex_t> vertex_coloring(
23682368
graph_view_t<vertex_t, edge_t, false, multi_gpu> const& graph_view,
23692369
raft::random::RngState& rng_state);
23702370

2371+
/*
2372+
* @brief Approximate Weighted Matching
2373+
*
2374+
* A matching in an undirected graph G = (V, E) is a pairing of adjacent vertices
2375+
* such that each vertex is matched with at most one other vertex, the objective
2376+
* being to match as many vertices as possible or to maximise the sum of the
2377+
* weights of the matched edges. Here we provide an implementation of an
2378+
* approximation algorithm to the weighted Maximum matching. See
2379+
* https://web.archive.org/web/20081031230449id_/http://www.ii.uib.no/~fredrikm/fredrik/papers/CP75.pdf
2380+
* for further information.
2381+
*
2382+
* @tparam vertex_t Type of vertex identifiers. Needs to be an integral type.
2383+
* @tparam edge_t Type of edge identifiers. Needs to be an integral type.
2384+
* @tparam multi_gpu Flag indicating whether template instantiation should target single-GPU (false)
2385+
* @param[in] handle RAFT handle object to encapsulate resources (e.g. CUDA stream, communicator,
2386+
* and handles to various CUDA libraries) to run graph algorithms.
2387+
* @param[in] graph_view Graph view object.
2388+
* @param[in] edge_weight_view View object holding edge weights for @p graph_view.
2389+
* @return A tuple of device vector of matched vertex ids and sum of the weights of the matched
2390+
* edges.
2391+
*/
2392+
template <typename vertex_t, typename edge_t, typename weight_t, bool multi_gpu>
2393+
std::tuple<rmm::device_uvector<vertex_t>, weight_t> approximate_weighted_matching(
2394+
raft::handle_t const& handle,
2395+
graph_view_t<vertex_t, edge_t, false, multi_gpu> const& graph_view,
2396+
edge_property_view_t<edge_t, weight_t const*> edge_weight_view);
23712397
} // namespace cugraph
23722398

23732399
/**

0 commit comments

Comments
 (0)