Skip to content

Commit

Permalink
Merge branch 'branch-24.12' into add-telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
msarahan authored Nov 4, 2024
2 parents b51728d + 050d524 commit bcbdda5
Show file tree
Hide file tree
Showing 91 changed files with 580 additions and 410 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ repos:
setup[.]cfg$
- id: verify-alpha-spec
- repo: https://github.com/rapidsai/dependency-file-generator
rev: v1.13.11
rev: v1.16.0
hooks:
- id: rapids-dependency-file-generator
args: ["--clean"]
Expand Down
2 changes: 2 additions & 0 deletions ci/build_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ rapids-logger "Begin cpp build"

RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) rapids-conda-retry mambabuild conda/recipes/libcugraph

sccache --show-adv-stats

rapids-upload-conda-to-s3 cpp
7 changes: 7 additions & 0 deletions ci/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,26 @@ export RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION)

rapids-logger "Begin py build"

sccache --zero-stats

# TODO: Remove `--no-test` flags once importing on a CPU
# node works correctly
rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
conda/recipes/pylibcugraph

sccache --show-adv-stats
sccache --zero-stats

rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \
conda/recipes/cugraph

sccache --show-adv-stats

# NOTE: nothing in nx-cugraph is CUDA-specific, but it is built on each CUDA
# platform to ensure it is included in each set of artifacts, since test
# scripts only install from one set of artifacts based on the CUDA version used
Expand Down
10 changes: 8 additions & 2 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ rapids-generate-version > ./VERSION

cd "${package_dir}"

sccache --zero-stats

rapids-logger "Building '${package_name}' wheel"

python -m pip wheel \
-w dist \
-v \
Expand All @@ -23,12 +27,14 @@ python -m pip wheel \
--extra-index-url https://pypi.nvidia.com \
.

sccache --show-adv-stats

# pure-python packages should be marked as pure, and not have auditwheel run on them.
if [[ ${package_name} == "nx-cugraph" ]] || \
[[ ${package_name} == "cugraph-dgl" ]] || \
[[ ${package_name} == "cugraph-pyg" ]] || \
[[ ${package_name} == "cugraph-equivariant" ]]; then
RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" RAPIDS_PY_WHEEL_PURE="1" rapids-upload-wheels-to-s3 dist
RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" RAPIDS_PY_WHEEL_PURE="1" rapids-upload-wheels-to-s3 python dist
else
case "${RAPIDS_CUDA_VERSION}" in
12.*)
Expand All @@ -48,5 +54,5 @@ else

mkdir -p final_dist
python -m auditwheel repair -w final_dist "${EXCLUDE_ARGS[@]}" dist/*
RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 final_dist
RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 python final_dist
fi
17 changes: 2 additions & 15 deletions cpp/include/cugraph_c/resource_handle.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023, NVIDIA CORPORATION.
* Copyright (c) 2022-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,6 +17,7 @@
#pragma once

#include <cugraph_c/error.h>
#include <cugraph_c/types.h>

#include <stddef.h>
#include <stdint.h>
Expand All @@ -25,20 +26,6 @@
extern "C" {
#endif

typedef enum bool_ { FALSE = 0, TRUE = 1 } bool_t;

typedef int8_t byte_t;

/**
* @deprecated - use cugraph_data_type_id_t;
*/
typedef enum data_type_id_ { INT32 = 0, INT64, FLOAT32, FLOAT64, SIZE_T, NTYPES } data_type_id_t;

/**
* @brief - Enumeration of data types
*/
typedef data_type_id_t cugraph_data_type_id_t;

typedef struct cugraph_resource_handle_ {
int32_t align_;
} cugraph_resource_handle_t;
Expand Down
47 changes: 47 additions & 0 deletions cpp/include/cugraph_c/types.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Copyright (c) 2022-2024, 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

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef enum bool_ { FALSE = 0, TRUE = 1 } bool_t;

typedef int8_t byte_t;

typedef enum data_type_id_ {
INT8 = 0,
INT16,
INT32,
INT64,
UINT8,
UINT16,
UINT32,
UINT64,
FLOAT32,
FLOAT64,
SIZE_T,
BOOL,
NTYPES
} cugraph_data_type_id_t;

#ifdef __cplusplus
}
#endif
3 changes: 2 additions & 1 deletion cpp/src/c_api/array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
namespace cugraph {
namespace c_api {

size_t data_type_sz[] = {4, 8, 4, 8, 8};
// FIXME: This is paired with type definition... better solution coming in 24.12 release.
size_t data_type_sz[] = {1, 2, 4, 8, 1, 2, 4, 8, 4, 8, 8, 1};

} // namespace c_api
} // namespace cugraph
Expand Down
70 changes: 35 additions & 35 deletions cpp/tests/c_api/biased_neighbor_sample_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ typedef int32_t vertex_t;
typedef int32_t edge_t;
typedef float weight_t;

data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
data_type_id_t edge_id_tid = INT32;
data_type_id_t edge_type_tid = INT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t edge_id_tid = INT32;
cugraph_data_type_id_t edge_type_tid = INT32;

int vertex_id_compare_function(const void* a, const void* b)
{
Expand Down Expand Up @@ -468,11 +468,11 @@ int generic_biased_neighbor_sample_test(const cugraph_resource_handle_t* handle,

int test_biased_neighbor_sample_with_labels(const cugraph_resource_handle_t* handle)
{
data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
data_type_id_t edge_id_tid = INT32;
data_type_id_t edge_type_tid = INT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t edge_id_tid = INT32;
cugraph_data_type_id_t edge_type_tid = INT32;

size_t num_edges = 8;
size_t num_vertices = 6;
Expand Down Expand Up @@ -686,11 +686,11 @@ int test_biased_neighbor_sample_with_labels(const cugraph_resource_handle_t* han

int test_biased_neighbor_sample_clean(const cugraph_resource_handle_t* handle)
{
data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
data_type_id_t edge_id_tid = INT32;
data_type_id_t edge_type_tid = INT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t edge_id_tid = INT32;
cugraph_data_type_id_t edge_type_tid = INT32;

size_t num_edges = 9;
size_t num_vertices = 6;
Expand Down Expand Up @@ -740,11 +740,11 @@ int test_biased_neighbor_sample_clean(const cugraph_resource_handle_t* handle)

int test_biased_neighbor_sample_dedupe_sources(const cugraph_resource_handle_t* handle)
{
data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
data_type_id_t edge_id_tid = INT32;
data_type_id_t edge_type_tid = INT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t edge_id_tid = INT32;
cugraph_data_type_id_t edge_type_tid = INT32;

size_t num_edges = 9;
size_t num_vertices = 6;
Expand Down Expand Up @@ -794,11 +794,11 @@ int test_biased_neighbor_sample_dedupe_sources(const cugraph_resource_handle_t*

int test_biased_neighbor_sample_unique_sources(const cugraph_resource_handle_t* handle)
{
data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
data_type_id_t edge_id_tid = INT32;
data_type_id_t edge_type_tid = INT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t edge_id_tid = INT32;
cugraph_data_type_id_t edge_type_tid = INT32;

size_t num_edges = 9;
size_t num_vertices = 6;
Expand Down Expand Up @@ -848,11 +848,11 @@ int test_biased_neighbor_sample_unique_sources(const cugraph_resource_handle_t*

int test_biased_neighbor_sample_carry_over_sources(const cugraph_resource_handle_t* handle)
{
data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
data_type_id_t edge_id_tid = INT32;
data_type_id_t edge_type_tid = INT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t edge_id_tid = INT32;
cugraph_data_type_id_t edge_type_tid = INT32;

size_t num_edges = 9;
size_t num_vertices = 6;
Expand Down Expand Up @@ -902,11 +902,11 @@ int test_biased_neighbor_sample_carry_over_sources(const cugraph_resource_handle

int test_biased_neighbor_sample_renumber_results(const cugraph_resource_handle_t* handle)
{
data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
data_type_id_t edge_id_tid = INT32;
data_type_id_t edge_type_tid = INT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t edge_id_tid = INT32;
cugraph_data_type_id_t edge_type_tid = INT32;

size_t num_edges = 9;
size_t num_vertices = 6;
Expand Down
10 changes: 5 additions & 5 deletions cpp/tests/c_api/c_test_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ int create_test_graph_double(const cugraph_resource_handle_t* p_handle,
cugraph_error_t** ret_error);

int create_sg_test_graph(const cugraph_resource_handle_t* handle,
data_type_id_t vertex_tid,
data_type_id_t edge_tid,
cugraph_data_type_id_t vertex_tid,
cugraph_data_type_id_t edge_tid,
void* h_src,
void* h_dst,
data_type_id_t weight_tid,
cugraph_data_type_id_t weight_tid,
void* h_wgt,
data_type_id_t edge_type_tid,
cugraph_data_type_id_t edge_type_tid,
void* h_edge_type,
data_type_id_t edge_id_tid,
cugraph_data_type_id_t edge_id_tid,
void* h_edge_id,
size_t num_edges,
bool_t store_transposed,
Expand Down
10 changes: 5 additions & 5 deletions cpp/tests/c_api/count_multi_edges_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ typedef int32_t vertex_t;
typedef int32_t edge_t;
typedef float weight_t;

data_type_id_t vertex_tid = INT32;
data_type_id_t edge_tid = INT32;
data_type_id_t weight_tid = FLOAT32;
data_type_id_t edge_id_tid = INT32;
data_type_id_t edge_type_tid = INT32;
cugraph_data_type_id_t vertex_tid = INT32;
cugraph_data_type_id_t edge_tid = INT32;
cugraph_data_type_id_t weight_tid = FLOAT32;
cugraph_data_type_id_t edge_id_tid = INT32;
cugraph_data_type_id_t edge_type_tid = INT32;

/*
* Create graph and count multi-edges
Expand Down
Loading

0 comments on commit bcbdda5

Please sign in to comment.