Skip to content

Commit

Permalink
resolve merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbarghi-nv committed Jul 25, 2024
2 parents 8529987 + 0900a06 commit ae9133f
Show file tree
Hide file tree
Showing 84 changed files with 5,587 additions and 666 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"context": "${localWorkspaceFolder}/.devcontainer",
"dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile",
"args": {
"CUDA": "12.2",
"CUDA": "12.5",
"PYTHON_PACKAGE_MANAGER": "conda",
"BASE": "rapidsai/devcontainers:24.08-cpp-mambaforge-ubuntu22.04"
}
},
"runArgs": [
"--rm",
"--name",
"${localEnv:USER:anon}-rapids-${localWorkspaceFolderBasename}-24.08-cuda12.2-conda"
"${localEnv:USER:anon}-rapids-${localWorkspaceFolderBasename}-24.08-cuda12.5-conda"
],
"hostRequirements": {"gpu": "optional"},
"features": {
Expand All @@ -20,7 +20,7 @@
"overrideFeatureInstallOrder": [
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils"
],
"initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}-cuda12.2-envs}"],
"initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}-cuda12.5-envs}"],
"postAttachCommand": ["/bin/bash", "-c", "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi"],
"workspaceFolder": "/home/coder",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/cugraph,type=bind,consistency=consistent",
Expand All @@ -29,7 +29,7 @@
"source=${localWorkspaceFolder}/../.cache,target=/home/coder/.cache,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../.config,target=/home/coder/.config,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../.conda/pkgs,target=/home/coder/.conda/pkgs,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../.conda/${localWorkspaceFolderBasename}-cuda12.2-envs,target=/home/coder/.conda/envs,type=bind,consistency=consistent"
"source=${localWorkspaceFolder}/../.conda/${localWorkspaceFolderBasename}-cuda12.5-envs,target=/home/coder/.conda/envs,type=bind,consistency=consistent"
],
"customizations": {
"vscode": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
"context": "${localWorkspaceFolder}/.devcontainer",
"dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile",
"args": {
"CUDA": "12.2",
"CUDA": "12.5",
"PYTHON_PACKAGE_MANAGER": "pip",
"BASE": "rapidsai/devcontainers:24.08-cpp-cuda12.2-ucx1.15.0-openmpi-ubuntu22.04"
"BASE": "rapidsai/devcontainers:24.08-cpp-cuda12.5-ucx1.15.0-openmpi-ubuntu22.04"
}
},
"runArgs": [
"--rm",
"--name",
"${localEnv:USER:anon}-rapids-${localWorkspaceFolderBasename}-24.08-cuda12.2-pip"
"${localEnv:USER:anon}-rapids-${localWorkspaceFolderBasename}-24.08-cuda12.5-pip"
],
"hostRequirements": {"gpu": "optional"},
"features": {
"ghcr.io/rapidsai/devcontainers/features/cuda:24.8": {
"version": "12.2",
"version": "12.5",
"installcuBLAS": true,
"installcuSOLVER": true,
"installcuRAND": true,
Expand All @@ -28,15 +28,15 @@
"ghcr.io/rapidsai/devcontainers/features/cuda",
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils"
],
"initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/share/${localWorkspaceFolderBasename}-cuda12.2-venvs}"],
"initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/share/${localWorkspaceFolderBasename}-cuda12.5-venvs}"],
"postAttachCommand": ["/bin/bash", "-c", "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi"],
"workspaceFolder": "/home/coder",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/cugraph,type=bind,consistency=consistent",
"mounts": [
"source=${localWorkspaceFolder}/../.aws,target=/home/coder/.aws,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../.cache,target=/home/coder/.cache,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../.config,target=/home/coder/.config,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../.local/share/${localWorkspaceFolderBasename}-cuda12.2-venvs,target=/home/coder/.local/share/venvs,type=bind,consistency=consistent"
"source=${localWorkspaceFolder}/../.local/share/${localWorkspaceFolderBasename}-cuda12.5-venvs,target=/home/coder/.local/share/venvs,type=bind,consistency=consistent"
],
"customizations": {
"vscode": {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ jobs:
uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@branch-24.08
with:
arch: '["amd64"]'
cuda: '["12.2"]'
cuda: '["12.5"]'
node_type: cpu32
extra-repo-deploy-key: CUGRAPH_OPS_SSH_PRIVATE_DEPLOY_KEY
build_command: |
Expand Down
11 changes: 10 additions & 1 deletion benchmarks/cugraph/pytest-based/bench_algos.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,17 @@ def bench_bfs(gpubenchmark, graph):


def bench_sssp(gpubenchmark, graph):
if not graph.is_weighted():
pytest.skip("Skipping: Unweighted Graphs are not supported by SSSP")

sssp = dask_cugraph.sssp if is_graph_distributed(graph) else cugraph.sssp
start = graph.edgelist.edgelist_df["src"][0]

start_col = graph.select_random_vertices(num_vertices=1)
if is_graph_distributed(graph):
start_col = start_col.compute()

start = start_col.to_arrow().to_pylist()[0]

gpubenchmark(sssp, graph, start)


Expand Down
106 changes: 53 additions & 53 deletions benchmarks/pytest.ini
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
[pytest]
pythonpath =
shared/python
shared/python

testpaths =
cugraph/pytest_based
cugraph-service/pytest_based
cugraph/pytest_based
cugraph-service/pytest_based

addopts =
--benchmark-columns="min, max, mean, stddev, outliers"
--benchmark-columns="min, max, mean, stddev, outliers"

markers =
managedmem_on: RMM managed memory enabled
managedmem_off: RMM managed memory disabled
poolallocator_on: RMM pool allocator enabled
poolallocator_off: RMM pool allocator disabled
tiny: tiny datasets
small: small datasets
medium: medium datasets
large: large datasets
directed: directed datasets
undirected: undirected datasets
matrix_types: inputs are matrices
nx_types: inputs are NetowrkX Graph objects
cugraph_types: inputs are cuGraph Graph objects
sg: single-GPU
mg: multi-GPU
snmg: single-node multi-GPU
mnmg: multi-node multi-GPU
local: local cugraph
remote: cugraph-service
batch_size_100: batch size of 100 for sampling algos
batch_size_500: batch size of 500 for sampling algos
batch_size_1000: batch size of 1000 for sampling algos
batch_size_2500: batch size of 2500 for sampling algos
batch_size_5000: batch size of 5000 for sampling algos
batch_size_10000: batch size of 10000 for sampling algos
batch_size_20000: batch size of 20000 for sampling algos
batch_size_30000: batch size of 30000 for sampling algos
batch_size_40000: batch size of 40000 for sampling algos
batch_size_50000: batch size of 50000 for sampling algos
batch_size_60000: batch size of 60000 for sampling algos
batch_size_70000: batch size of 70000 for sampling algos
batch_size_80000: batch size of 80000 for sampling algos
batch_size_90000: batch size of 90000 for sampling algos
batch_size_100000: batch size of 100000 for sampling algos
num_clients_2: start 2 cugraph-service clients
num_clients_4: start 4 cugraph-service clients
num_clients_8: start 8 cugraph-service clients
num_clients_16: start 16 cugraph-service clients
num_clients_32: start 32 cugraph-service clients
fanout_10_25: fanout [10, 25] for sampling algos
fanout_5_10_15: fanout [5, 10, 15] for sampling algos
rmat_data: RMAT-generated synthetic datasets
file_data: datasets from $RAPIDS_DATASET_ROOT_DIR
managedmem_on: RMM managed memory enabled
managedmem_off: RMM managed memory disabled
poolallocator_on: RMM pool allocator enabled
poolallocator_off: RMM pool allocator disabled
tiny: tiny datasets
small: small datasets
medium: medium datasets
large: large datasets
directed: directed datasets
undirected: undirected datasets
matrix_types: inputs are matrices
nx_types: inputs are NetowrkX Graph objects
cugraph_types: inputs are cuGraph Graph objects
sg: single-GPU
mg: multi-GPU
snmg: single-node multi-GPU
mnmg: multi-node multi-GPU
local: local cugraph
remote: cugraph-service
batch_size_100: batch size of 100 for sampling algos
batch_size_500: batch size of 500 for sampling algos
batch_size_1000: batch size of 1000 for sampling algos
batch_size_2500: batch size of 2500 for sampling algos
batch_size_5000: batch size of 5000 for sampling algos
batch_size_10000: batch size of 10000 for sampling algos
batch_size_20000: batch size of 20000 for sampling algos
batch_size_30000: batch size of 30000 for sampling algos
batch_size_40000: batch size of 40000 for sampling algos
batch_size_50000: batch size of 50000 for sampling algos
batch_size_60000: batch size of 60000 for sampling algos
batch_size_70000: batch size of 70000 for sampling algos
batch_size_80000: batch size of 80000 for sampling algos
batch_size_90000: batch size of 90000 for sampling algos
batch_size_100000: batch size of 100000 for sampling algos
num_clients_2: start 2 cugraph-service clients
num_clients_4: start 4 cugraph-service clients
num_clients_8: start 8 cugraph-service clients
num_clients_16: start 16 cugraph-service clients
num_clients_32: start 32 cugraph-service clients
fanout_10_25: fanout [10, 25] for sampling algos
fanout_5_10_15: fanout [5, 10, 15] for sampling algos
rmat_data: RMAT-generated synthetic datasets
file_data: datasets from $RAPIDS_DATASET_ROOT_DIR

python_classes =
Bench*
Test*
Bench*
Test*

python_files =
bench_*
test_*
bench_*
test_*

python_functions =
bench_*
test_*
bench_*
test_*
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ dependencies:
- sphinx-markdown-tables
- sphinx<6
- sphinxcontrib-websupport
- thriftpy2<=0.5.0
- thriftpy2!=0.5.0,!=0.5.1
- torchdata
- ucx-proc=*=gpu
- ucx-py==0.39.*,>=0.0.0a0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies:
- cuda-nvcc
- cuda-nvtx-dev
- cuda-profiler-api
- cuda-version=12.2
- cuda-version=12.5
- cudf==24.8.*,>=0.0.0a0
- cupy>=12.0.0
- cxx-compiler
Expand Down Expand Up @@ -77,10 +77,10 @@ dependencies:
- sphinx-markdown-tables
- sphinx<6
- sphinxcontrib-websupport
- thriftpy2<=0.5.0
- thriftpy2!=0.5.0,!=0.5.1
- torchdata
- ucx-proc=*=gpu
- ucx-py==0.39.*,>=0.0.0a0
- wget
- wheel
name: all_cuda-122_arch-x86_64
name: all_cuda-125_arch-x86_64
4 changes: 2 additions & 2 deletions conda/recipes/cugraph-service/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ outputs:
- rapids-build-backend>=0.3.1,<0.4.0.dev0
run:
- python
- thriftpy2 >=0.4.15
- thriftpy2 >=0.4.15,!=0.5.0,!=0.5.1

- name: cugraph-service-server
version: {{ version }}
Expand Down Expand Up @@ -65,7 +65,7 @@ outputs:
- numpy >=1.23,<2.0a0
- python
- rapids-dask-dependency ={{ minor_version }}
- thriftpy2 >=0.4.15
- thriftpy2 >=0.4.15,!=0.5.0,!=0.5.1
- ucx-py {{ ucx_py_version }}

tests:
Expand Down
2 changes: 1 addition & 1 deletion cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ add_library(cugraph_c
src/c_api/lookup_src_dst.cpp
src/c_api/louvain.cpp
src/c_api/triangle_count.cpp
src/c_api/uniform_neighbor_sampling.cpp
src/c_api/neighbor_sampling.cpp
src/c_api/labeling_result.cpp
src/c_api/weakly_connected_components.cpp
src/c_api/strongly_connected_components.cpp
Expand Down
66 changes: 66 additions & 0 deletions cpp/include/cugraph/graph_functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,72 @@ create_graph_from_edgelist(raft::handle_t const& handle,
bool renumber,
bool do_expensive_check = false);

/**
* @brief create a graph from (the optional vertex list and) the given edge list (with optional edge
* IDs and types).
*
* This version takes edge list in multiple chunks (e.g. edge data from multiple files).
*
* @tparam vertex_t Type of vertex identifiers. Needs to be an integral type.
* @tparam edge_t Type of edge identifiers. Needs to be an integral type.
* @tparam weight_t Type of edge weight. Needs to be floating point type
* @tparam edge_id_t Type of edge id. Needs to be an integral type
* @tparam edge_type_t Type of edge type. Needs to be an integral type, currently only int32_t is
* supported
* @tparam store_transposed Flag indicating whether to use sources (if false) or destinations (if
* true) as major indices in storing edges using a 2D sparse matrix. transposed.
* @tparam multi_gpu Flag indicating whether template instantiation should target single-GPU (false)
* or multi-GPU (true).
* @param handle RAFT handle object to encapsulate resources (e.g. CUDA stream, communicator, and
* handles to various CUDA libraries) to run graph algorithms.
* @param vertices If valid, part of the entire set of vertices in the graph to be renumbered.
* This parameter can be used to include isolated vertices. If @p renumber is false and @p vertices
* is valid, @p vertices elements should be consecutive integers starting from 0. If multi-GPU,
* applying the compute_gpu_id_from_vertex_t to every vertex should return the local GPU ID for this
* function to work (vertices should be pre-shuffled).
* @param edgelist_srcs Vectors of edge source vertex IDs. If multi-GPU, applying the
* compute_gpu_id_from_ext_edge_endpoints_t to every edge should return the local GPU ID for this
* function to work (edges should be pre-shuffled).
* @param edgelist_dsts Vectors of edge destination vertex IDs.
* @param edgelist_weights Vectors of weight values for edges
* @param edgelist_edge_ids Vectors of edge_id values for edges
* @param edgelist_edge_types Vectors of edge_type values for edges
* @param graph_properties Properties of the graph represented by the input (optional vertex list
* and) edge list.
* @param renumber Flag indicating whether to renumber vertices or not (must be true if @p multi_gpu
* is true).
* @param do_expensive_check A flag to run expensive checks for input arguments (if set to `true`).
* @return Tuple of the generated graph and optional edge_property_t objects storing the provided
* edge properties and a renumber map (if @p renumber is true).
*/
template <typename vertex_t,
typename edge_t,
typename weight_t,
typename edge_id_t,
typename edge_type_t,
bool store_transposed,
bool multi_gpu>
std::tuple<
graph_t<vertex_t, edge_t, store_transposed, multi_gpu>,
std::optional<
edge_property_t<graph_view_t<vertex_t, edge_t, store_transposed, multi_gpu>, weight_t>>,
std::optional<
edge_property_t<graph_view_t<vertex_t, edge_t, store_transposed, multi_gpu>, edge_id_t>>,
std::optional<
edge_property_t<graph_view_t<vertex_t, edge_t, store_transposed, multi_gpu>, edge_type_t>>,
std::optional<rmm::device_uvector<vertex_t>>>
create_graph_from_edgelist(
raft::handle_t const& handle,
std::optional<rmm::device_uvector<vertex_t>>&& vertices,
std::vector<rmm::device_uvector<vertex_t>>&& edgelist_srcs,
std::vector<rmm::device_uvector<vertex_t>>&& edgelist_dsts,
std::optional<std::vector<rmm::device_uvector<weight_t>>>&& edgelist_weights,
std::optional<std::vector<rmm::device_uvector<edge_id_t>>>&& edgelist_edge_ids,
std::optional<std::vector<rmm::device_uvector<edge_type_t>>>&& edgelist_edge_types,
graph_properties_t graph_properties,
bool renumber,
bool do_expensive_check = false);

/**
* @brief Find all 2-hop neighbors in the graph
*
Expand Down
Loading

0 comments on commit ae9133f

Please sign in to comment.