From 5c0378c634bd3351dfeb8e4484919988f7a64b42 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 28 Jun 2022 18:41:48 -0700 Subject: [PATCH 01/90] install required dependencies in the .toml file, remove setuptools extension build and setup, rely on skbuild setup instead --- python/cugraph/pyproject.toml | 32 ++++++++++++ python/cugraph/setup.py | 78 +++++------------------------- python/cugraph/setuputils.py | 20 ++++++++ python/pylibcugraph/pyproject.toml | 32 ++++++++++++ 4 files changed, 97 insertions(+), 65 deletions(-) create mode 100644 python/cugraph/pyproject.toml create mode 100644 python/pylibcugraph/pyproject.toml diff --git a/python/cugraph/pyproject.toml b/python/cugraph/pyproject.toml new file mode 100644 index 00000000000..f2b9306f7ca --- /dev/null +++ b/python/cugraph/pyproject.toml @@ -0,0 +1,32 @@ +# Copyright (c) 2021-2022, NVIDIA CORPORATION. + +[build-system] + +requires = [ + "wheel", + "setuptools", + "cython>=0.29,<0.30", + "scikit-build>=0.13.1", + "cmake>=3.20.1,!=3.23.0", + "ninja", +] + +[tool.black] +line-length = 79 +target-version = ["py36"] +include = '\.py?$' +exclude = ''' +/( + thirdparty | + \.eggs | + \.git | + \.hg | + \.mypy_cache | + \.tox | + \.venv | + _build | + buck-out | + build | + dist +)/ +''' \ No newline at end of file diff --git a/python/cugraph/setup.py b/python/cugraph/setup.py index 8cf5abc58dd..b5fba50a4d5 100644 --- a/python/cugraph/setup.py +++ b/python/cugraph/setup.py @@ -16,24 +16,10 @@ import sysconfig import shutil -# Must import in this order: -# setuptools -> Cython.Distutils.build_ext -> setuptools.command.build_ext -# Otherwise, setuptools.command.build_ext ends up inheriting from -# Cython.Distutils.old_build_ext which we do not want -import setuptools - -try: - from Cython.Distutils.build_ext import new_build_ext as _build_ext -except ImportError: - from setuptools.command.build_ext import build_ext as _build_ext - -from distutils.sysconfig import get_python_lib - -import setuptools.command.build_ext from setuptools import find_packages, setup, Command -from setuptools.extension import Extension +from skbuild import setup -from setuputils import get_environment_option +from setuputils import get_environment_option, get_cuda_version_from_header import versioneer @@ -41,20 +27,26 @@ INSTALL_REQUIRES = ['numba', 'cython'] CYTHON_FILES = ['cugraph/**/*.pyx'] + + UCX_HOME = get_environment_option("UCX_HOME") CUDA_HOME = get_environment_option('CUDA_HOME') CONDA_PREFIX = get_environment_option('CONDA_PREFIX') +# FIXME: No need to include the path to the conda dir +""" conda_lib_dir = os.path.normpath(sys.prefix) + '/lib' conda_include_dir = os.path.normpath(sys.prefix) + '/include' if CONDA_PREFIX: conda_include_dir = CONDA_PREFIX + '/include' conda_lib_dir = CONDA_PREFIX + '/lib' +""" if not UCX_HOME: UCX_HOME = CONDA_PREFIX if CONDA_PREFIX else os.sys.prefix +# FIXME: add ucx to INSTALL_REQUIRES ucx_include_dir = os.path.join(UCX_HOME, "include") ucx_lib_dir = os.path.join(UCX_HOME, "lib") @@ -75,13 +67,10 @@ ) cuda_include_dir = os.path.join(CUDA_HOME, "include") -cuda_lib_dir = os.path.join(CUDA_HOME, "lib64") - -# Optional location of C++ build folder that can be configured by the user -libcugraph_path = get_environment_option('CUGRAPH_BUILD_PATH') +INSTALL_REQUIRES.append( + "cupy-cuda" + get_cuda_version_from_header(cuda_include_dir) +) -if not libcugraph_path: - libcugraph_path = conda_lib_dir extensions = [ Extension("*", @@ -130,46 +119,6 @@ def run(self): os.system('find . -name "*.cpp" -type f -delete') os.system('find . -name "*.cpython*.so" -type f -delete') - -class build_ext_no_debug(_build_ext): - - def build_extensions(self): - def remove_flags(compiler, *flags): - for flag in flags: - try: - compiler.compiler_so = list( - filter((flag).__ne__, compiler.compiler_so) - ) - except Exception: - pass - # Full optimization - self.compiler.compiler_so.append("-O3") - # No debug symbols, full optimization, no '-Wstrict-prototypes' warning - remove_flags( - self.compiler, "-g", "-G", "-O1", "-O2", "-Wstrict-prototypes" - ) - super().build_extensions() - - def finalize_options(self): - if self.distribution.ext_modules: - # Delay import this to allow for Cython-less installs - from Cython.Build.Dependencies import cythonize - - nthreads = getattr(self, "parallel", None) # -j option in Py3.5+ - nthreads = int(nthreads) if nthreads else None - self.distribution.ext_modules = cythonize( - self.distribution.ext_modules, - nthreads=nthreads, - force=self.force, - gdb_debug=False, - compiler_directives=dict( - profile=False, language_level=3, embedsignature=True - ), - ) - # Skip calling super() and jump straight to setuptools - setuptools.command.build_ext.build_ext.finalize_options(self) - - cmdclass = dict() cmdclass.update(versioneer.get_cmdclass()) cmdclass["build_ext"] = build_ext_no_debug @@ -183,13 +132,12 @@ def finalize_options(self): "Intended Audience :: Developers", # "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7" + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3." ], # Include the separately-compiled shared library author="NVIDIA Corporation", setup_requires=['Cython>=0.29,<0.30'], - ext_modules=extensions, packages=find_packages(include=['cugraph', 'cugraph.*']), install_requires=INSTALL_REQUIRES, license="Apache", diff --git a/python/cugraph/setuputils.py b/python/cugraph/setuputils.py index 09ae5dbd31f..5e9b934f461 100644 --- a/python/cugraph/setuputils.py +++ b/python/cugraph/setuputils.py @@ -245,3 +245,23 @@ def get_repo_cmake_info(names, file_path): def _get_repo_path(): python_dir = Path(__file__).resolve().parent return str(python_dir.parent.parent.absolute()) + + +def get_cuda_version_from_header(cuda_include_dir, delimeter=""): + + cuda_version = None + + with open(os.path.join(cuda_include_dir, "cuda.h"), encoding="utf-8") as f: + for line in f.readlines(): + if re.search(r"#define CUDA_VERSION ", line) is not None: + cuda_version = line + break + + if cuda_version is None: + raise TypeError("CUDA_VERSION not found in cuda.h") + cuda_version = int(cuda_version.split()[2]) + return "%d%s%d" % ( + cuda_version // 1000, + delimeter, + (cuda_version % 1000) // 10, + ) \ No newline at end of file diff --git a/python/pylibcugraph/pyproject.toml b/python/pylibcugraph/pyproject.toml new file mode 100644 index 00000000000..f2b9306f7ca --- /dev/null +++ b/python/pylibcugraph/pyproject.toml @@ -0,0 +1,32 @@ +# Copyright (c) 2021-2022, NVIDIA CORPORATION. + +[build-system] + +requires = [ + "wheel", + "setuptools", + "cython>=0.29,<0.30", + "scikit-build>=0.13.1", + "cmake>=3.20.1,!=3.23.0", + "ninja", +] + +[tool.black] +line-length = 79 +target-version = ["py36"] +include = '\.py?$' +exclude = ''' +/( + thirdparty | + \.eggs | + \.git | + \.hg | + \.mypy_cache | + \.tox | + \.venv | + _build | + buck-out | + build | + dist +)/ +''' \ No newline at end of file From c8cba3534086dabf59e1c399a77ded04b40e6c92 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 28 Jun 2022 18:43:00 -0700 Subject: [PATCH 02/90] update setup.py --- python/cugraph/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cugraph/setup.py b/python/cugraph/setup.py index b5fba50a4d5..670a5c32bc1 100644 --- a/python/cugraph/setup.py +++ b/python/cugraph/setup.py @@ -16,7 +16,7 @@ import sysconfig import shutil -from setuptools import find_packages, setup, Command +from setuptools import find_packages, Command from skbuild import setup from setuputils import get_environment_option, get_cuda_version_from_header From c2e51b2ac132ff52d1e25b5f78481794234a326d Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 28 Jun 2022 18:50:06 -0700 Subject: [PATCH 03/90] update the files to be ignored --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 44a1471fefc..e313475f53b 100644 --- a/.gitignore +++ b/.gitignore @@ -29,11 +29,14 @@ junit-cugraph.xml test-results ## Python build directories & artifacts +dask-worker-space/ htmlcov dist/ cugraph.egg-info/ python/build python/cugraph/bindings/*.cpp +wheels/ +_skbuild/ ## pylibcugraph build directories & artifacts python/pylibcugraph/pylibcugraph.egg-info From 9aad42db3468b2e8890489a4efe9504dba611967 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 28 Jun 2022 18:57:44 -0700 Subject: [PATCH 04/90] add scikit build to the list of dependencies in cuda11.5.yml --- conda/environments/cugraph_dev_cuda11.5.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conda/environments/cugraph_dev_cuda11.5.yml b/conda/environments/cugraph_dev_cuda11.5.yml index 9da2410ad46..cbd9142dd7b 100644 --- a/conda/environments/cugraph_dev_cuda11.5.yml +++ b/conda/environments/cugraph_dev_cuda11.5.yml @@ -26,6 +26,8 @@ dependencies: - clang=11.1.0 - clang-tools=11.1.0 - cmake>=3.20.1,!=3.23.0 +- cmake_setuptools>=0.1.3 +- scikit-build>=0.13.1 - python>=3.6,<3.9 - notebook>=0.5.0 - boost From 34fb5bf7f19d55f1b579709c5cbc7c065e2a3b19 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 28 Jun 2022 19:02:24 -0700 Subject: [PATCH 05/90] add cmake to the list of dependencies to be installed --- conda/recipes/cugraph/conda_build_config.yaml | 3 +++ conda/recipes/cugraph/meta.yaml | 1 + conda/recipes/pylibcugraph/conda_build_config.yaml | 3 +++ conda/recipes/pylibcugraph/meta.yaml | 1 + 4 files changed, 8 insertions(+) diff --git a/conda/recipes/cugraph/conda_build_config.yaml b/conda/recipes/cugraph/conda_build_config.yaml index 322fe6faacf..8db7dbb7923 100644 --- a/conda/recipes/cugraph/conda_build_config.yaml +++ b/conda/recipes/cugraph/conda_build_config.yaml @@ -7,5 +7,8 @@ cxx_compiler_version: cuda_compiler: - nvcc +cmake_version: + - ">=3.20.1,!=3.23.0" + sysroot_version: - "2.17" diff --git a/conda/recipes/cugraph/meta.yaml b/conda/recipes/cugraph/meta.yaml index 752cd7c37c8..adb859195d6 100644 --- a/conda/recipes/cugraph/meta.yaml +++ b/conda/recipes/cugraph/meta.yaml @@ -25,6 +25,7 @@ build: requirements: build: + - cmake {{ cmake_version }} - {{ compiler('c') }} - {{ compiler('cxx') }} - {{ compiler('cuda') }} {{ cuda_version }} diff --git a/conda/recipes/pylibcugraph/conda_build_config.yaml b/conda/recipes/pylibcugraph/conda_build_config.yaml index 322fe6faacf..8db7dbb7923 100644 --- a/conda/recipes/pylibcugraph/conda_build_config.yaml +++ b/conda/recipes/pylibcugraph/conda_build_config.yaml @@ -7,5 +7,8 @@ cxx_compiler_version: cuda_compiler: - nvcc +cmake_version: + - ">=3.20.1,!=3.23.0" + sysroot_version: - "2.17" diff --git a/conda/recipes/pylibcugraph/meta.yaml b/conda/recipes/pylibcugraph/meta.yaml index a6dec1d50ba..6142500c9c6 100644 --- a/conda/recipes/pylibcugraph/meta.yaml +++ b/conda/recipes/pylibcugraph/meta.yaml @@ -25,6 +25,7 @@ build: requirements: build: + - cmake {{ cmake_version }} - {{ compiler('c') }} - {{ compiler('cxx') }} - {{ compiler('cuda') }} {{ cuda_version }} From 499a4287f6c82c42b2a327161ff10be5034cc7bc Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 28 Jun 2022 19:28:49 -0700 Subject: [PATCH 06/90] add cmake file for each dir containing source files --- python/cugraph/CMakeLists.txt | 100 ++++++++++++++++++ .../cugraph/cugraph/centrality/CMakeLists.txt | 37 +++++++ .../cugraph/cugraph/community/CMakeLists.txt | 30 ++++++ .../cugraph/cugraph/components/CMakeLists.txt | 30 ++++++ python/cugraph/cugraph/cores/CMakeLists.txt | 30 ++++++ .../cugraph/dask/centrality/CMakeLists.txt | 30 ++++++ .../cugraph/cugraph/dask/comms/CMakeLists.txt | 30 ++++++ .../cugraph/dask/community/CMakeLists.txt | 30 ++++++ .../cugraph/dask/components/CMakeLists.txt | 30 ++++++ .../cugraph/dask/link_analysis/CMakeLists.txt | 30 ++++++ .../cugraph/dask/structure/CMakeLists.txt | 30 ++++++ .../cugraph/cugraph/generators/CMakeLists.txt | 30 ++++++ .../cugraph/cugraph/internals/CMakeLists.txt | 30 ++++++ python/cugraph/cugraph/layout/CMakeLists.txt | 30 ++++++ .../cugraph/linear_assignment/CMakeLists.txt | 30 ++++++ .../cugraph/link_analysis/CMakeLists.txt | 30 ++++++ .../cugraph/link_prediction/CMakeLists.txt | 30 ++++++ .../cugraph/cugraph/sampling/CMakeLists.txt | 30 ++++++ .../cugraph/cugraph/structure/CMakeLists.txt | 30 ++++++ python/cugraph/cugraph/tree/CMakeLists.txt | 30 ++++++ .../cugraph/cugraph/utilities/CMakeLists.txt | 30 ++++++ 21 files changed, 707 insertions(+) create mode 100644 python/cugraph/CMakeLists.txt create mode 100644 python/cugraph/cugraph/centrality/CMakeLists.txt create mode 100644 python/cugraph/cugraph/community/CMakeLists.txt create mode 100644 python/cugraph/cugraph/components/CMakeLists.txt create mode 100644 python/cugraph/cugraph/cores/CMakeLists.txt create mode 100644 python/cugraph/cugraph/dask/centrality/CMakeLists.txt create mode 100644 python/cugraph/cugraph/dask/comms/CMakeLists.txt create mode 100644 python/cugraph/cugraph/dask/community/CMakeLists.txt create mode 100644 python/cugraph/cugraph/dask/components/CMakeLists.txt create mode 100644 python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt create mode 100644 python/cugraph/cugraph/dask/structure/CMakeLists.txt create mode 100644 python/cugraph/cugraph/generators/CMakeLists.txt create mode 100644 python/cugraph/cugraph/internals/CMakeLists.txt create mode 100644 python/cugraph/cugraph/layout/CMakeLists.txt create mode 100644 python/cugraph/cugraph/linear_assignment/CMakeLists.txt create mode 100644 python/cugraph/cugraph/link_analysis/CMakeLists.txt create mode 100644 python/cugraph/cugraph/link_prediction/CMakeLists.txt create mode 100644 python/cugraph/cugraph/sampling/CMakeLists.txt create mode 100644 python/cugraph/cugraph/structure/CMakeLists.txt create mode 100644 python/cugraph/cugraph/tree/CMakeLists.txt create mode 100644 python/cugraph/cugraph/utilities/CMakeLists.txt diff --git a/python/cugraph/CMakeLists.txt b/python/cugraph/CMakeLists.txt new file mode 100644 index 00000000000..039782fb62e --- /dev/null +++ b/python/cugraph/CMakeLists.txt @@ -0,0 +1,100 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +cmake_minimum_required(VERSION 3.20.1 FATAL_ERROR) + +set(cugraph_version 22.08.00) + +file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-22.08/RAPIDS.cmake + ${CMAKE_BINARY_DIR}/RAPIDS.cmake) +include(${CMAKE_BINARY_DIR}/RAPIDS.cmake) + +project( + cugraph-python + VERSION ${cugraph_version} + LANGUAGES # TODO: Building Python extension modules via the python_extension_module requires the C + # language to be enabled here. The test project that is built in scikit-build to verify + # various linking options for the python library is hardcoded to build with C, so until + # that is fixed we need to keep C. + C CXX +) + +################################################################################ +# - User Options -------------------------------------------------------------- +option(FIND_CUGRAPH_CPP "Search for existing CUGRAPH C++ installations before defaulting to local files" + OFF +) + +# If the user requested it, we attempt to find CUGRAPH. +if(FIND_CUGRAPH_CPP) + message(STATUS "trying to find the package") + find_package(cugraph ${cugraph_version} REQUIRED) +else() + set(cugraph_FOUND OFF) +endif() + +message(STATUS "check if it was found ${cugraph_FOUND}") + +if(NOT cugraph_FOUND) + # TODO: This will not be necessary once we upgrade to CMake 3.22, which will pull in the required + # languages for the C++ project even if this project does not require those languges. + include(rapids-cuda) + rapids_cuda_init_architectures(cugraph-python) + enable_language(CUDA) + + # FIXME: check of this is necessary + # Since cugraph only enables CUDA optionally, we need to manually include the file that + # rapids_cuda_init_architectures relies on `project` including. + + include("${CMAKE_PROJECT_cugraph-python_INCLUDE}") + + # FIXME: are those parameter necessary? + + set(BUILD_TESTS OFF) + set(BUILD_BENCHMARKS OFF) + message(STATUS "installing packages") + add_subdirectory(../../cpp cugraph-cpp) + + # Since there are multiple subpackages of cudf._lib that require access to libcudf, we place the + # library in the _lib/cpp directory as a single source of truth and modify the other rpaths + # appropriately. + install(TARGETS cugraph DESTINATION cugraph/library) +endif() + + +include(rapids-cython) +rapids_cython_init() + +# FIXME: Update build directory +# add_subdirectory(cugraph) +add_subdirectory(cugraph/centrality) +add_subdirectory(cugraph/community) +add_subdirectory(cugraph/components) +add_subdirectory(cugraph/cores) +add_subdirectory(cugraph/dask/centrality) +add_subdirectory(cugraph/dask/comms) +add_subdirectory(cugraph/dask/community) +add_subdirectory(cugraph/dask/components) +add_subdirectory(cugraph/dask/link_analysis) +add_subdirectory(cugraph/dask/structure) +add_subdirectory(cugraph/generators) +add_subdirectory(cugraph/internals) +add_subdirectory(cugraph/layout) +add_subdirectory(cugraph/linear_assignment) +add_subdirectory(cugraph/link_analysis) +add_subdirectory(cugraph/link_prediction) +add_subdirectory(cugraph/sampling) +add_subdirectory(cugraph/structure) +add_subdirectory(cugraph/tree) +add_subdirectory(cugraph/utilities) diff --git a/python/cugraph/cugraph/centrality/CMakeLists.txt b/python/cugraph/cugraph/centrality/CMakeLists.txt new file mode 100644 index 00000000000..967f8e409c0 --- /dev/null +++ b/python/cugraph/cugraph/centrality/CMakeLists.txt @@ -0,0 +1,37 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources betweenness_centrality_wrapper.pyx edge_betweenness_centrality_wrapper.pyx) +set(linked_libraries cugraph::cugraph) +#set(linked_libraries "/jnke/scikit-build-pr/cugraph/cpp") +#message(STATUS "linked library is ${linked_libraries}") + +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX centrality_ +) +#message(STATUS "linked library is ${linked_libraries}") + +set(targets_using_numpy centrality_betweenness_centrality_wrapper centrality_edge_betweenness_centrality_wrapper) +foreach(target IN LISTS targets_using_numpy) + target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") +endforeach() +#message(STATUS "Done setting target") +message(STATUS "origin is ${LIBCUGRAPH_BUILD_DIR}") +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() + +#message(STATUS "Done adding path") \ No newline at end of file diff --git a/python/cugraph/cugraph/community/CMakeLists.txt b/python/cugraph/cugraph/community/CMakeLists.txt new file mode 100644 index 00000000000..8071ee9f684 --- /dev/null +++ b/python/cugraph/cugraph/community/CMakeLists.txt @@ -0,0 +1,30 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources ecg_wrapper.pyx egonet_wrapper.pyx ktruss_subgraph_wrapper.pyx leiden_wrapper.pyx louvain_wrapper.pyx spectral_clustering_wrapper.pyx subgraph_extraction_wrapper.pyx triangle_count_wrapper.pyx) +set(linked_libraries cugraph::cugraph) +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX community_ +) + +set(targets_using_numpy community_ecg_wrapper community_egonet_wrapper community_ktruss_subgraph_wrapper community_leiden_wrapper community_louvain_wrapper community_spectral_clustering_wrapper community_subgraph_extraction_wrapper community_triangle_count_wrapper) +foreach(target IN LISTS targets_using_numpy) + target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") +endforeach() + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() \ No newline at end of file diff --git a/python/cugraph/cugraph/components/CMakeLists.txt b/python/cugraph/cugraph/components/CMakeLists.txt new file mode 100644 index 00000000000..e24f35d114b --- /dev/null +++ b/python/cugraph/cugraph/components/CMakeLists.txt @@ -0,0 +1,30 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources connectivity_wrapper.pyx) +set(linked_libraries cugraph::cugraph) +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX components_ +) + +set(targets_using_numpy components_connectivity_wrapper) +foreach(target IN LISTS targets_using_numpy) + target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") +endforeach() + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() \ No newline at end of file diff --git a/python/cugraph/cugraph/cores/CMakeLists.txt b/python/cugraph/cugraph/cores/CMakeLists.txt new file mode 100644 index 00000000000..71c791780af --- /dev/null +++ b/python/cugraph/cugraph/cores/CMakeLists.txt @@ -0,0 +1,30 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources core_number_wrapper.pyx k_core_wrapper.pyx) +set(linked_libraries cugraph::cugraph) +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX cores_ +) + +set(targets_using_numpy cores_core_number_wrapper cores_k_core_wrapper) +foreach(target IN LISTS targets_using_numpy) + target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") +endforeach() + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() \ No newline at end of file diff --git a/python/cugraph/cugraph/dask/centrality/CMakeLists.txt b/python/cugraph/cugraph/dask/centrality/CMakeLists.txt new file mode 100644 index 00000000000..86c01f84f2c --- /dev/null +++ b/python/cugraph/cugraph/dask/centrality/CMakeLists.txt @@ -0,0 +1,30 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources mg_katz_centrality_wrapper.pyx) +set(linked_libraries cugraph::cugraph) +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX centrality_ +) + +set(targets_using_numpy centrality_mg_katz_centrality_wrapper) +foreach(target IN LISTS targets_using_numpy) + target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") +endforeach() + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") +endforeach() \ No newline at end of file diff --git a/python/cugraph/cugraph/dask/comms/CMakeLists.txt b/python/cugraph/cugraph/dask/comms/CMakeLists.txt new file mode 100644 index 00000000000..c7a56a9bf31 --- /dev/null +++ b/python/cugraph/cugraph/dask/comms/CMakeLists.txt @@ -0,0 +1,30 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources comms_wrapper.pyx) +set(linked_libraries cugraph::cugraph) +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX comms_ +) + +set(targets_using_numpy comms_comms_wrapper) +foreach(target IN LISTS targets_using_numpy) + target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") +endforeach() + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") +endforeach() \ No newline at end of file diff --git a/python/cugraph/cugraph/dask/community/CMakeLists.txt b/python/cugraph/cugraph/dask/community/CMakeLists.txt new file mode 100644 index 00000000000..ed8ae91a5d7 --- /dev/null +++ b/python/cugraph/cugraph/dask/community/CMakeLists.txt @@ -0,0 +1,30 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources louvain_wrapper.pyx) +set(linked_libraries cugraph::cugraph) +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX dask_community_ +) + +set(targets_using_numpy dask_community_louvain_wrapper) +foreach(target IN LISTS targets_using_numpy) + target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") +endforeach() + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") +endforeach() \ No newline at end of file diff --git a/python/cugraph/cugraph/dask/components/CMakeLists.txt b/python/cugraph/cugraph/dask/components/CMakeLists.txt new file mode 100644 index 00000000000..55923753b56 --- /dev/null +++ b/python/cugraph/cugraph/dask/components/CMakeLists.txt @@ -0,0 +1,30 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources mg_connectivity_wrapper.pyx) +set(linked_libraries cugraph::cugraph) +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX components_ +) + +set(targets_using_numpy components_mg_connectivity_wrapper) +foreach(target IN LISTS targets_using_numpy) + target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") +endforeach() + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") +endforeach() \ No newline at end of file diff --git a/python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt b/python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt new file mode 100644 index 00000000000..287e11890e5 --- /dev/null +++ b/python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt @@ -0,0 +1,30 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources mg_pagerank_wrapper.pyx) +set(linked_libraries cugraph::cugraph) +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX link_analysis_ +) + +set(targets_using_numpy link_analysis_mg_pagerank_wrapper) +foreach(target IN LISTS targets_using_numpy) + target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") +endforeach() + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") +endforeach() \ No newline at end of file diff --git a/python/cugraph/cugraph/dask/structure/CMakeLists.txt b/python/cugraph/cugraph/dask/structure/CMakeLists.txt new file mode 100644 index 00000000000..2e1a8e0fe95 --- /dev/null +++ b/python/cugraph/cugraph/dask/structure/CMakeLists.txt @@ -0,0 +1,30 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources replication.pyx) +set(linked_libraries cugraph::cugraph) +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX structure_ +) + +set(targets_using_numpy structure_replication) +foreach(target IN LISTS targets_using_numpy) + target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") +endforeach() + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") +endforeach() \ No newline at end of file diff --git a/python/cugraph/cugraph/generators/CMakeLists.txt b/python/cugraph/cugraph/generators/CMakeLists.txt new file mode 100644 index 00000000000..566da64d903 --- /dev/null +++ b/python/cugraph/cugraph/generators/CMakeLists.txt @@ -0,0 +1,30 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources rmat_wrapper.pyx) +set(linked_libraries cugraph::cugraph) +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX generators_ +) + +set(targets_using_numpy generators_rmat_wrapper) +foreach(target IN LISTS targets_using_numpy) + target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") +endforeach() + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() \ No newline at end of file diff --git a/python/cugraph/cugraph/internals/CMakeLists.txt b/python/cugraph/cugraph/internals/CMakeLists.txt new file mode 100644 index 00000000000..bfb8bc67aa4 --- /dev/null +++ b/python/cugraph/cugraph/internals/CMakeLists.txt @@ -0,0 +1,30 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources internals.pyx) +set(linked_libraries cugraph::cugraph) +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX internals_ +) + +set(targets_using_numpy internals_internals) +foreach(target IN LISTS targets_using_numpy) + target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") +endforeach() + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() \ No newline at end of file diff --git a/python/cugraph/cugraph/layout/CMakeLists.txt b/python/cugraph/cugraph/layout/CMakeLists.txt new file mode 100644 index 00000000000..a9ed1622678 --- /dev/null +++ b/python/cugraph/cugraph/layout/CMakeLists.txt @@ -0,0 +1,30 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources force_atlas2_wrapper.pyx) +set(linked_libraries cugraph::cugraph) +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX layout_ +) + +set(targets_using_numpy layout_force_atlas2_wrapper) +foreach(target IN LISTS targets_using_numpy) + target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") +endforeach() + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() \ No newline at end of file diff --git a/python/cugraph/cugraph/linear_assignment/CMakeLists.txt b/python/cugraph/cugraph/linear_assignment/CMakeLists.txt new file mode 100644 index 00000000000..b3b30fd2d33 --- /dev/null +++ b/python/cugraph/cugraph/linear_assignment/CMakeLists.txt @@ -0,0 +1,30 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources lap_wrapper.pyx) +set(linked_libraries cugraph::cugraph) +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX linear_assignment_ +) + +set(targets_using_numpy linear_assignment_lap_wrapper) +foreach(target IN LISTS targets_using_numpy) + target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") +endforeach() + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() \ No newline at end of file diff --git a/python/cugraph/cugraph/link_analysis/CMakeLists.txt b/python/cugraph/cugraph/link_analysis/CMakeLists.txt new file mode 100644 index 00000000000..53ae20964c7 --- /dev/null +++ b/python/cugraph/cugraph/link_analysis/CMakeLists.txt @@ -0,0 +1,30 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources pagerank_wrapper.pyx) +set(linked_libraries cugraph::cugraph) +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX link_analysis_ +) + +set(targets_using_numpy link_analysis_pagerank_wrapper) +foreach(target IN LISTS targets_using_numpy) + target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") +endforeach() + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() \ No newline at end of file diff --git a/python/cugraph/cugraph/link_prediction/CMakeLists.txt b/python/cugraph/cugraph/link_prediction/CMakeLists.txt new file mode 100644 index 00000000000..6d7012c1d0b --- /dev/null +++ b/python/cugraph/cugraph/link_prediction/CMakeLists.txt @@ -0,0 +1,30 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources jaccard_wrapper.pyx overlap_wrapper.pyx) +set(linked_libraries cugraph::cugraph) +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX link_prediction_ +) + +set(targets_using_numpy link_prediction_jaccard_wrapper link_prediction_overlap_wrapper) +foreach(target IN LISTS targets_using_numpy) + target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") +endforeach() + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() \ No newline at end of file diff --git a/python/cugraph/cugraph/sampling/CMakeLists.txt b/python/cugraph/cugraph/sampling/CMakeLists.txt new file mode 100644 index 00000000000..cf496444086 --- /dev/null +++ b/python/cugraph/cugraph/sampling/CMakeLists.txt @@ -0,0 +1,30 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources random_walks_wrapper.pyx) +set(linked_libraries cugraph::cugraph) +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX sampling_ +) + +set(targets_using_numpy sampling_random_walks_wrapper) +foreach(target IN LISTS targets_using_numpy) + target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") +endforeach() + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() \ No newline at end of file diff --git a/python/cugraph/cugraph/structure/CMakeLists.txt b/python/cugraph/cugraph/structure/CMakeLists.txt new file mode 100644 index 00000000000..76acad35fc0 --- /dev/null +++ b/python/cugraph/cugraph/structure/CMakeLists.txt @@ -0,0 +1,30 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources graph_primtypes_wrapper.pyx graph_primtypes.pyx renumber_wrapper.pyx utils_wrapper.pyx) +set(linked_libraries cugraph::cugraph) +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX structure_ +) + +set(targets_using_numpy structure_graph_primtypes_wrapper structure_graph_primtypes structure_renumber_wrapper structure_utils_wrapper) +foreach(target IN LISTS targets_using_numpy) + target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") +endforeach() + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() \ No newline at end of file diff --git a/python/cugraph/cugraph/tree/CMakeLists.txt b/python/cugraph/cugraph/tree/CMakeLists.txt new file mode 100644 index 00000000000..ffc7366770e --- /dev/null +++ b/python/cugraph/cugraph/tree/CMakeLists.txt @@ -0,0 +1,30 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources minimum_spanning_tree_wrapper.pyx) +set(linked_libraries cugraph::cugraph) +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX tree_ +) + +set(targets_using_numpy tree_minimum_spanning_tree_wrapper) +foreach(target IN LISTS targets_using_numpy) + target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") +endforeach() + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() \ No newline at end of file diff --git a/python/cugraph/cugraph/utilities/CMakeLists.txt b/python/cugraph/cugraph/utilities/CMakeLists.txt new file mode 100644 index 00000000000..362b19d7945 --- /dev/null +++ b/python/cugraph/cugraph/utilities/CMakeLists.txt @@ -0,0 +1,30 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources path_retrieval_wrapper.pyx) +set(linked_libraries cugraph::cugraph) +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX utilities_ +) + +set(targets_using_numpy utilities_path_retrieval_wrapper) +foreach(target IN LISTS targets_using_numpy) + target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") +endforeach() + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() \ No newline at end of file From 5aa278e5b49b466b8f680f407bcb97e124c93021 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 28 Jun 2022 19:31:40 -0700 Subject: [PATCH 07/90] update docstrings --- python/cugraph/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/cugraph/CMakeLists.txt b/python/cugraph/CMakeLists.txt index 039782fb62e..d49a29a4385 100644 --- a/python/cugraph/CMakeLists.txt +++ b/python/cugraph/CMakeLists.txt @@ -38,14 +38,14 @@ option(FIND_CUGRAPH_CPP "Search for existing CUGRAPH C++ installations before de # If the user requested it, we attempt to find CUGRAPH. if(FIND_CUGRAPH_CPP) - message(STATUS "trying to find the package") find_package(cugraph ${cugraph_version} REQUIRED) else() set(cugraph_FOUND OFF) endif() -message(STATUS "check if it was found ${cugraph_FOUND}") +# FIXME: pylibcugraph should be installing libcugraph in its directory and cugraph should link +# to it if(NOT cugraph_FOUND) # TODO: This will not be necessary once we upgrade to CMake 3.22, which will pull in the required # languages for the C++ project even if this project does not require those languges. From f6bca73f1952904da3b5c8684642590fb20900d6 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 28 Jun 2022 20:36:00 -0700 Subject: [PATCH 08/90] add path to libcugraph for cmake, add option to find libcugraph instead of building it --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 1182adfa0ef..a309c322699 100755 --- a/build.sh +++ b/build.sh @@ -230,7 +230,7 @@ if buildAll || hasArg pylibcugraph; then # setup.py references an env var CUGRAPH_BUILD_PATH to find the libcugraph # build. If not set by the user, set it to LIBCUGRAPH_BUILD_DIR CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH:=${LIBCUGRAPH_BUILD_DIR}} - env CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH} python setup.py build_ext --inplace --library-dir=${LIBCUGRAPH_BUILD_DIR} + python setup.py build_ext --inplace --library-dir=${LIBCUGRAPH_BUILD_DIR} -- -DFIND_CUGRAPH_CPP=ON -Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} if [[ ${INSTALL_TARGET} != "" ]]; then env CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH} python setup.py install fi @@ -243,7 +243,7 @@ if buildAll || hasArg cugraph; then # setup.py references an env var CUGRAPH_BUILD_PATH to find the libcugraph # build. If not set by the user, set it to LIBCUGRAPH_BUILD_DIR CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH:=${LIBCUGRAPH_BUILD_DIR}} - env CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH} python setup.py build_ext --inplace --library-dir=${LIBCUGRAPH_BUILD_DIR} + python setup.py build_ext --inplace --library-dir=${LIBCUGRAPH_BUILD_DIR} -- -DFIND_CUGRAPH_CPP=ON -Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} if [[ ${INSTALL_TARGET} != "" ]]; then env CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH} python setup.py install fi From 1efb09d46a0fbf93ed122006b024e33bcc2ca8bf Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 28 Jun 2022 20:36:50 -0700 Subject: [PATCH 09/90] update pylibcugraph setup file to leverage scikit build instead of setuptools --- python/pylibcugraph/setup.py | 56 +++++++++++++++++------------------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/python/pylibcugraph/setup.py b/python/pylibcugraph/setup.py index ca6a419faa8..6132b053c9a 100644 --- a/python/pylibcugraph/setup.py +++ b/python/pylibcugraph/setup.py @@ -13,38 +13,41 @@ import os import sys -import sysconfig import shutil -from setuptools import setup, find_packages, Command -from setuptools.extension import Extension -from setuputils import get_environment_option +from setuptools import find_packages, Command +from skbuild import setup +#FIXME: Not necessary +from skbuild.command.build_ext import build_ext -try: - from Cython.Distutils.build_ext import new_build_ext as build_ext -except ImportError: - from setuptools.command.build_ext import build_ext +from setuputils import get_environment_option, get_cuda_version_from_header import versioneer from distutils.sysconfig import get_python_lib - -CYTHON_FILES = ['pylibcugraph/**/*.pyx'] +INSTALL_REQUIRES = [] +# CYTHON_FILES = ['pylibcugraph/**/*.pyx'] UCX_HOME = get_environment_option("UCX_HOME") CUDA_HOME = get_environment_option('CUDA_HOME') -CONDA_PREFIX = get_environment_option('CONDA_PREFIX') +# FIXME: No need to include the path to the conda dir +""" +CONDA_PREFIX = get_environment_option('CONDA_PREFIX') conda_lib_dir = os.path.normpath(sys.prefix) + '/lib' conda_include_dir = os.path.normpath(sys.prefix) + '/include' if CONDA_PREFIX: conda_include_dir = CONDA_PREFIX + '/include' conda_lib_dir = CONDA_PREFIX + '/lib' +""" if not UCX_HOME: UCX_HOME = CONDA_PREFIX if CONDA_PREFIX else os.sys.prefix + +# FIXME: create a list of packages required INSTALL_REQUIRES +# FIXME: add ucx to INSTALL_REQUIRES ucx_include_dir = os.path.join(UCX_HOME, "include") ucx_lib_dir = os.path.join(UCX_HOME, "lib") @@ -65,14 +68,10 @@ ) cuda_include_dir = os.path.join(CUDA_HOME, "include") -cuda_lib_dir = os.path.join(CUDA_HOME, "lib64") - -# Optional location of C++ build folder that can be configured by the user -libcugraph_path = get_environment_option('CUGRAPH_BUILD_PATH') - -if not libcugraph_path: - libcugraph_path = conda_lib_dir - +INSTALL_REQUIRES.append( + "cupy-cuda" + get_cuda_version_from_header(cuda_include_dir) +) +# cuda_lib_dir = os.path.join(CUDA_HOME, "lib64") class CleanCommand(Command): """Custom clean command to tidy up the project root.""" @@ -101,6 +100,7 @@ def run(self): cmdclass["build_ext"] = build_ext cmdclass["clean"] = CleanCommand +""" EXTENSIONS = [ Extension("*", sources=CYTHON_FILES, @@ -126,28 +126,26 @@ def run(self): language='c++', extra_compile_args=['-std=c++17']) ] - -for e in EXTENSIONS: - e.cython_directives = dict( - profile=False, language_level=3, embedsignature=True - ) +""" setup(name='pylibcugraph', - description="pylibcugraph - GPU Graph Analytics", + description="pylibcuGraph - RAPIDS GPU Graph Analytics", version=versioneer.get_version(), classifiers=[ # "Development Status :: 4 - Beta", "Intended Audience :: Developers", # "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7" + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9" ], # Include the separately-compiled shared library author="NVIDIA Corporation", - setup_requires=['cython'], - ext_modules=EXTENSIONS, + setup_requires=['Cython>=0.29,<0.30'], packages=find_packages(include=['pylibcugraph', 'pylibcugraph.*']), + package_data={ + key: ["*.pxd"] for key in find_packages(include=["pylibcugraph*"]) + }, license="Apache", cmdclass=cmdclass, zip_safe=False) From 6966a93bf41a1f9035600e494d4b280b3661aded Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 28 Jun 2022 20:38:03 -0700 Subject: [PATCH 10/90] add cmake file for each dir containing source files --- python/cugraph/setup.py | 12 +-- python/pylibcugraph/CMakeLists.txt | 86 +++++++++++++++++++ .../pylibcugraph/pylibcugraph/CMakeLists.txt | 53 ++++++++++++ .../pylibcugraph/components/CMakeLists.txt | 30 +++++++ .../pylibcugraph/raft/common/CMakeLists.txt | 31 +++++++ 5 files changed, 207 insertions(+), 5 deletions(-) create mode 100644 python/pylibcugraph/CMakeLists.txt create mode 100644 python/pylibcugraph/pylibcugraph/CMakeLists.txt create mode 100644 python/pylibcugraph/pylibcugraph/components/CMakeLists.txt create mode 100644 python/pylibcugraph/pylibcugraph/raft/common/CMakeLists.txt diff --git a/python/cugraph/setup.py b/python/cugraph/setup.py index 670a5c32bc1..2affeb45888 100644 --- a/python/cugraph/setup.py +++ b/python/cugraph/setup.py @@ -20,6 +20,8 @@ from skbuild import setup from setuputils import get_environment_option, get_cuda_version_from_header +#FIXME: Not necessary +from skbuild.command.build_ext import build_ext import versioneer @@ -31,10 +33,10 @@ UCX_HOME = get_environment_option("UCX_HOME") CUDA_HOME = get_environment_option('CUDA_HOME') -CONDA_PREFIX = get_environment_option('CONDA_PREFIX') # FIXME: No need to include the path to the conda dir """ +CONDA_PREFIX = get_environment_option('CONDA_PREFIX') conda_lib_dir = os.path.normpath(sys.prefix) + '/lib' conda_include_dir = os.path.normpath(sys.prefix) + '/include' @@ -71,7 +73,7 @@ "cupy-cuda" + get_cuda_version_from_header(cuda_include_dir) ) - +""" extensions = [ Extension("*", sources=CYTHON_FILES, @@ -97,7 +99,7 @@ extra_compile_args=['-std=c++17']) ] - +""" class CleanCommand(Command): """Custom clean command to tidy up the project root.""" user_options = [('all', None, None), ] @@ -121,8 +123,8 @@ def run(self): cmdclass = dict() cmdclass.update(versioneer.get_cmdclass()) -cmdclass["build_ext"] = build_ext_no_debug cmdclass["clean"] = CleanCommand +cmdclass["build_ext"] = build_ext setup(name='cugraph', description="cuGraph - RAPIDS GPU Graph Analytics", @@ -133,7 +135,7 @@ def run(self): # "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3." + "Programming Language :: Python :: 3.9" ], # Include the separately-compiled shared library author="NVIDIA Corporation", diff --git a/python/pylibcugraph/CMakeLists.txt b/python/pylibcugraph/CMakeLists.txt new file mode 100644 index 00000000000..eca907946ff --- /dev/null +++ b/python/pylibcugraph/CMakeLists.txt @@ -0,0 +1,86 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +cmake_minimum_required(VERSION 3.20.1 FATAL_ERROR) + +set(pylibcugraph_version 22.08.00) + +file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-22.08/RAPIDS.cmake + ${CMAKE_BINARY_DIR}/RAPIDS.cmake) +include(${CMAKE_BINARY_DIR}/RAPIDS.cmake) + +project( + pylibcugraph-python + VERSION ${pylibcugraph_version} + LANGUAGES # TODO: Building Python extension modules via the python_extension_module requires the C + # language to be enabled here. The test project that is built in scikit-build to verify + # various linking options for the python library is hardcoded to build with C, so until + # that is fixed we need to keep C. + C CXX +) + +################################################################################ +# - User Options -------------------------------------------------------------- +option(FIND_CUGRAPH_CPP "Search for existing CUGRAPH C++ installations before defaulting to local files" + OFF +) +# message(STATUS "looking for packages") + +# If the user requested it we attempt to find CUGRAPH. + +if(FIND_CUGRAPH_CPP) + message(STATUS "trying to find the package") + find_package(cugraph ${cugraph_version} REQUIRED) + #find_package(cugraph_c REQUIRED) +else() + set(cugraph_FOUND OFF) +endif() + +message(STATUS "check if it was found ${cugraph_FOUND}") +# NOT cugraph_FOUND +if(NOT cugraph_FOUND) + # TODO: This will not be necessary once we upgrade to CMake 3.22, which will pull in the required + # languages for the C++ project even if this project does not require those languges. + include(rapids-cuda) + rapids_cuda_init_architectures(pylibcugraph-python) + enable_language(CUDA) + + # FIXME: check of this is necessary + # Since cugraph only enables CUDA optionally, we need to manually include the file that + # rapids_cuda_init_architectures relies on `project` including. + + include("${CMAKE_PROJECT_cugraph-python_INCLUDE}") + + # FIXME: are those parameter necessary? + + set(BUILD_TESTS OFF) + set(BUILD_BENCHMARKS OFF) + message(STATUS "installing packages") + add_subdirectory(../../cpp cugraph-cpp) + + # Since there are multiple subpackages of cudf._lib that require access to libcudf, we place the + # library in the _lib/cpp directory as a single source of truth and modify the other rpaths + # appropriately. + install(TARGETS cugraph DESTINATION pylibcugraph/library) +endif() + + +include(rapids-cython) +rapids_cython_init() + +# FIXME: Update build directory +# add_subdirectory(cugraph) +add_subdirectory(pylibcugraph) +add_subdirectory(pylibcugraph/components) +add_subdirectory(pylibcugraph/raft/common) diff --git a/python/pylibcugraph/pylibcugraph/CMakeLists.txt b/python/pylibcugraph/pylibcugraph/CMakeLists.txt new file mode 100644 index 00000000000..e21d06033d6 --- /dev/null +++ b/python/pylibcugraph/pylibcugraph/CMakeLists.txt @@ -0,0 +1,53 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources + bfs.pyx + eigenvector_centrality.pyx + graph_properties.pyx + graphs.pyx + hits.pyx + katz_centrality.pyx + node2vec.pyx + pagerank.pyx + resource_handle.pyx + sssp.pyx + triangle_count.pyx + uniform_neighbor_sample.pyx + utils.pyx +) +set(linked_libraries cugraph::cugraph) +set(linked_libraries_c cugraph_c) +#set(linked_libraries "/jnke/scikit-build-pr/cugraph/cpp") +#message(STATUS "linked library is ${linked_libraries}") + +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES ${linked_libraries} ${linked_libraries_c} +) + +# TODO: Finding NumPy requires finding Development as well. Once this is fixed in CMake (no date +# yet) we can remove the extra component spec. +find_package(Python REQUIRED COMPONENTS Development NumPy) +set(targets_using_numpy pagerank sssp utils) +foreach(target IN LISTS targets_using_numpy) + target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") +endforeach() + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() + +#message(STATUS "Done adding path") \ No newline at end of file diff --git a/python/pylibcugraph/pylibcugraph/components/CMakeLists.txt b/python/pylibcugraph/pylibcugraph/components/CMakeLists.txt new file mode 100644 index 00000000000..ee8a2b73116 --- /dev/null +++ b/python/pylibcugraph/pylibcugraph/components/CMakeLists.txt @@ -0,0 +1,30 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources + _connectivity.pyx +) +set(linked_libraries cugraph::cugraph) +#set(linked_libraries "/jnke/scikit-build-pr/cugraph/cpp") +#message(STATUS "linked library is ${linked_libraries}") + +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES "${linked_libraries}" +) + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() diff --git a/python/pylibcugraph/pylibcugraph/raft/common/CMakeLists.txt b/python/pylibcugraph/pylibcugraph/raft/common/CMakeLists.txt new file mode 100644 index 00000000000..051f85c8e32 --- /dev/null +++ b/python/pylibcugraph/pylibcugraph/raft/common/CMakeLists.txt @@ -0,0 +1,31 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= + +set(cython_sources + cuda.pyx + handle.pyx +) +set(linked_libraries cugraph::cugraph) +#set(linked_libraries "/jnke/scikit-build-pr/cugraph/cpp") +#message(STATUS "linked library is ${linked_libraries}") + +rapids_cython_create_modules( + CXX + SOURCE_FILES "${cython_sources}" + LINKED_LIBRARIES "${linked_libraries}" +) + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() From 33f5b88391b9a5c7247fd4a87a7b56b4e14c547d Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 28 Jun 2022 20:44:45 -0700 Subject: [PATCH 11/90] get CONDA_PREFIX --- python/cugraph/setup.py | 2 +- python/pylibcugraph/setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/cugraph/setup.py b/python/cugraph/setup.py index 2affeb45888..25d5762265c 100644 --- a/python/cugraph/setup.py +++ b/python/cugraph/setup.py @@ -33,10 +33,10 @@ UCX_HOME = get_environment_option("UCX_HOME") CUDA_HOME = get_environment_option('CUDA_HOME') +CONDA_PREFIX = get_environment_option('CONDA_PREFIX') # FIXME: No need to include the path to the conda dir """ -CONDA_PREFIX = get_environment_option('CONDA_PREFIX') conda_lib_dir = os.path.normpath(sys.prefix) + '/lib' conda_include_dir = os.path.normpath(sys.prefix) + '/include' diff --git a/python/pylibcugraph/setup.py b/python/pylibcugraph/setup.py index 6132b053c9a..a4b0c5b49df 100644 --- a/python/pylibcugraph/setup.py +++ b/python/pylibcugraph/setup.py @@ -30,10 +30,10 @@ UCX_HOME = get_environment_option("UCX_HOME") CUDA_HOME = get_environment_option('CUDA_HOME') +CONDA_PREFIX = get_environment_option('CONDA_PREFIX') # FIXME: No need to include the path to the conda dir """ -CONDA_PREFIX = get_environment_option('CONDA_PREFIX') conda_lib_dir = os.path.normpath(sys.prefix) + '/lib' conda_include_dir = os.path.normpath(sys.prefix) + '/include' From cfa4fd7d1853ed558ce393b3e24369ece6e74382 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 28 Jun 2022 20:47:43 -0700 Subject: [PATCH 12/90] update the type check --- python/pylibcugraph/pylibcugraph/utilities/api_tools.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/python/pylibcugraph/pylibcugraph/utilities/api_tools.py b/python/pylibcugraph/pylibcugraph/utilities/api_tools.py index 0cee609c730..075c505d107 100644 --- a/python/pylibcugraph/pylibcugraph/utilities/api_tools.py +++ b/python/pylibcugraph/pylibcugraph/utilities/api_tools.py @@ -33,7 +33,8 @@ def experimental_warning_wrapper(obj): discovered and used. """ obj_type = type(obj) - if obj_type not in [type, types.FunctionType, types.BuiltinFunctionType]: + #if obj_type not in [type, types.FunctionType, types.BuiltinFunctionType]: + if not isinstance(obj_type, (type, types.FunctionType, types.BuiltinFunctionType)): raise TypeError("obj must be a class or a function type, got " f"{obj_type}") @@ -102,7 +103,8 @@ def promoted_experimental_warning_wrapper(obj): have the experimental namespace. """ obj_type = type(obj) - if obj_type not in [type, types.FunctionType, types.BuiltinFunctionType]: + #if obj_type not in [type, types.FunctionType, types.BuiltinFunctionType]: + if not isinstance(obj_type, (type, types.FunctionType, types.BuiltinFunctionType)): raise TypeError("obj must be a class or a function type, got " f"{obj_type}") @@ -154,7 +156,8 @@ def deprecated_warning_wrapper(obj): by a refactored version), prior to calling obj and returning its value. """ obj_type = type(obj) - if obj_type not in [type, types.FunctionType, types.BuiltinFunctionType]: + #if obj_type not in [type, types.FunctionType, types.BuiltinFunctionType]: + if not isinstance(obj_type, (type, types.FunctionType, types.BuiltinFunctionType)): raise TypeError("obj must be a class or a function type, got " f"{obj_type}") From f159367e2686d29030da3f719bed953e05e8b044 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 28 Jun 2022 20:51:00 -0700 Subject: [PATCH 13/90] define function get_cuda_version_from_header in setuputils.py --- python/pylibcugraph/setuputils.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/python/pylibcugraph/setuputils.py b/python/pylibcugraph/setuputils.py index d2251a80af7..2a6b927416e 100644 --- a/python/pylibcugraph/setuputils.py +++ b/python/pylibcugraph/setuputils.py @@ -245,3 +245,22 @@ def get_repo_cmake_info(names, file_path): def _get_repo_path(): python_dir = Path(__file__).resolve().parent return str(python_dir.parent.parent.absolute()) + +def get_cuda_version_from_header(cuda_include_dir, delimeter=""): + + cuda_version = None + + with open(os.path.join(cuda_include_dir, "cuda.h"), encoding="utf-8") as f: + for line in f.readlines(): + if re.search(r"#define CUDA_VERSION ", line) is not None: + cuda_version = line + break + + if cuda_version is None: + raise TypeError("CUDA_VERSION not found in cuda.h") + cuda_version = int(cuda_version.split()[2]) + return "%d%s%d" % ( + cuda_version // 1000, + delimeter, + (cuda_version % 1000) // 10, + ) From 0faab0f9e109ba51a31b61b387985961f6fac3fc Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 28 Jun 2022 21:10:32 -0700 Subject: [PATCH 14/90] ignore cufile.log --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e313475f53b..7bd759bbc10 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ python/build python/cugraph/bindings/*.cpp wheels/ _skbuild/ +cufile.log ## pylibcugraph build directories & artifacts python/pylibcugraph/pylibcugraph.egg-info From 2a4d6e4746e8a304f91c7f38b30364f4b0a12896 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 28 Jun 2022 21:15:00 -0700 Subject: [PATCH 15/90] remove cupy-cuda{version} from the list of packages required to be installed because of version conflict --- python/cugraph/setup.py | 3 +++ python/pylibcugraph/setup.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/python/cugraph/setup.py b/python/cugraph/setup.py index 25d5762265c..f9811e92189 100644 --- a/python/cugraph/setup.py +++ b/python/cugraph/setup.py @@ -69,9 +69,12 @@ ) cuda_include_dir = os.path.join(CUDA_HOME, "include") +# FIXME: This is causing a second version of cupy to be installed cupy-cuda115 +""" INSTALL_REQUIRES.append( "cupy-cuda" + get_cuda_version_from_header(cuda_include_dir) ) +""" """ extensions = [ diff --git a/python/pylibcugraph/setup.py b/python/pylibcugraph/setup.py index a4b0c5b49df..a9f10a1ead5 100644 --- a/python/pylibcugraph/setup.py +++ b/python/pylibcugraph/setup.py @@ -68,10 +68,12 @@ ) cuda_include_dir = os.path.join(CUDA_HOME, "include") +# FIXME: This is causing a second version of cupy to be installed cupy-cuda115 +""" INSTALL_REQUIRES.append( "cupy-cuda" + get_cuda_version_from_header(cuda_include_dir) ) -# cuda_lib_dir = os.path.join(CUDA_HOME, "lib64") +""" class CleanCommand(Command): """Custom clean command to tidy up the project root.""" From 10f121a69d96e9306db89dcc55a90c92e377a6d8 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 28 Jun 2022 21:16:17 -0700 Subject: [PATCH 16/90] remove outdated code --- python/pylibcugraph/setup.py | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/python/pylibcugraph/setup.py b/python/pylibcugraph/setup.py index a9f10a1ead5..bbb2d1816e1 100644 --- a/python/pylibcugraph/setup.py +++ b/python/pylibcugraph/setup.py @@ -102,34 +102,6 @@ def run(self): cmdclass["build_ext"] = build_ext cmdclass["clean"] = CleanCommand -""" -EXTENSIONS = [ - Extension("*", - sources=CYTHON_FILES, - include_dirs=[ - conda_include_dir, - ucx_include_dir, - "../../cpp/include", - "../../thirdparty/cub", - os.path.join(conda_include_dir, "libcudacxx"), - cuda_include_dir, - os.path.dirname(sysconfig.get_path("include")) - ], - library_dirs=[ - get_python_lib(), - conda_lib_dir, - libcugraph_path, - ucx_lib_dir, - cuda_lib_dir, - os.path.join(os.sys.prefix, "lib") - ], - libraries=['cudart', 'cusparse', 'cusolver', 'cugraph', 'nccl', - 'cugraph_c', 'cublas'], - language='c++', - extra_compile_args=['-std=c++17']) -] -""" - setup(name='pylibcugraph', description="pylibcuGraph - RAPIDS GPU Graph Analytics", version=versioneer.get_version(), From 531061edcbdac945c318edc5fa1a309e85b87dc3 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 28 Jun 2022 21:55:39 -0700 Subject: [PATCH 17/90] fix flake8 --- build.sh | 6 ++-- python/cugraph/setup.py | 36 +++---------------- python/cugraph/setuputils.py | 2 +- .../pylibcugraph/utilities/api_tools.py | 15 ++++---- python/pylibcugraph/setup.py | 8 ++--- python/pylibcugraph/setuputils.py | 1 + 6 files changed, 23 insertions(+), 45 deletions(-) diff --git a/build.sh b/build.sh index a309c322699..777cae06080 100755 --- a/build.sh +++ b/build.sh @@ -230,7 +230,8 @@ if buildAll || hasArg pylibcugraph; then # setup.py references an env var CUGRAPH_BUILD_PATH to find the libcugraph # build. If not set by the user, set it to LIBCUGRAPH_BUILD_DIR CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH:=${LIBCUGRAPH_BUILD_DIR}} - python setup.py build_ext --inplace --library-dir=${LIBCUGRAPH_BUILD_DIR} -- -DFIND_CUGRAPH_CPP=ON -Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} + python setup.py build_ext --inplace --library-dir=${LIBCUGRAPH_BUILD_DIR} \ + -- -DFIND_CUGRAPH_CPP=ON -Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} if [[ ${INSTALL_TARGET} != "" ]]; then env CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH} python setup.py install fi @@ -243,7 +244,8 @@ if buildAll || hasArg cugraph; then # setup.py references an env var CUGRAPH_BUILD_PATH to find the libcugraph # build. If not set by the user, set it to LIBCUGRAPH_BUILD_DIR CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH:=${LIBCUGRAPH_BUILD_DIR}} - python setup.py build_ext --inplace --library-dir=${LIBCUGRAPH_BUILD_DIR} -- -DFIND_CUGRAPH_CPP=ON -Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} + python setup.py build_ext --inplace --library-dir=${LIBCUGRAPH_BUILD_DIR} \ + -- -DFIND_CUGRAPH_CPP=ON -Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} if [[ ${INSTALL_TARGET} != "" ]]; then env CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH} python setup.py install fi diff --git a/python/cugraph/setup.py b/python/cugraph/setup.py index f9811e92189..e292a8af4fa 100644 --- a/python/cugraph/setup.py +++ b/python/cugraph/setup.py @@ -12,15 +12,14 @@ # limitations under the License. import os -import sys -import sysconfig import shutil from setuptools import find_packages, Command from skbuild import setup -from setuputils import get_environment_option, get_cuda_version_from_header -#FIXME: Not necessary +from setuputils import get_environment_option +# from setuputils import get_cuda_version_from_header +# FIXME: Not necessary from skbuild.command.build_ext import build_ext import versioneer @@ -29,8 +28,6 @@ INSTALL_REQUIRES = ['numba', 'cython'] CYTHON_FILES = ['cugraph/**/*.pyx'] - - UCX_HOME = get_environment_option("UCX_HOME") CUDA_HOME = get_environment_option('CUDA_HOME') CONDA_PREFIX = get_environment_option('CONDA_PREFIX') @@ -76,33 +73,7 @@ ) """ -""" -extensions = [ - Extension("*", - sources=CYTHON_FILES, - include_dirs=[ - conda_include_dir, - ucx_include_dir, - '../cpp/include', - "../thirdparty/cub", - os.path.join(conda_include_dir, "libcudacxx"), - cuda_include_dir, - os.path.dirname(sysconfig.get_path("include")) - ], - library_dirs=[ - get_python_lib(), - conda_lib_dir, - libcugraph_path, - ucx_lib_dir, - cuda_lib_dir, - os.path.join(os.sys.prefix, "lib") - ], - libraries=['cudart', 'cusparse', 'cusolver', 'cugraph', 'nccl'], - language='c++', - extra_compile_args=['-std=c++17']) -] -""" class CleanCommand(Command): """Custom clean command to tidy up the project root.""" user_options = [('all', None, None), ] @@ -124,6 +95,7 @@ def run(self): os.system('find . -name "*.cpp" -type f -delete') os.system('find . -name "*.cpython*.so" -type f -delete') + cmdclass = dict() cmdclass.update(versioneer.get_cmdclass()) cmdclass["clean"] = CleanCommand diff --git a/python/cugraph/setuputils.py b/python/cugraph/setuputils.py index 5e9b934f461..83269fa240c 100644 --- a/python/cugraph/setuputils.py +++ b/python/cugraph/setuputils.py @@ -264,4 +264,4 @@ def get_cuda_version_from_header(cuda_include_dir, delimeter=""): cuda_version // 1000, delimeter, (cuda_version % 1000) // 10, - ) \ No newline at end of file + ) diff --git a/python/pylibcugraph/pylibcugraph/utilities/api_tools.py b/python/pylibcugraph/pylibcugraph/utilities/api_tools.py index 075c505d107..b904359b99a 100644 --- a/python/pylibcugraph/pylibcugraph/utilities/api_tools.py +++ b/python/pylibcugraph/pylibcugraph/utilities/api_tools.py @@ -33,8 +33,9 @@ def experimental_warning_wrapper(obj): discovered and used. """ obj_type = type(obj) - #if obj_type not in [type, types.FunctionType, types.BuiltinFunctionType]: - if not isinstance(obj_type, (type, types.FunctionType, types.BuiltinFunctionType)): + # if obj_type not in [type, types.FunctionType, types.BuiltinFunctionType]: + if not isinstance( + obj_type, (type, types.FunctionType, types.BuiltinFunctionType)): raise TypeError("obj must be a class or a function type, got " f"{obj_type}") @@ -103,8 +104,9 @@ def promoted_experimental_warning_wrapper(obj): have the experimental namespace. """ obj_type = type(obj) - #if obj_type not in [type, types.FunctionType, types.BuiltinFunctionType]: - if not isinstance(obj_type, (type, types.FunctionType, types.BuiltinFunctionType)): + # if obj_type not in [type, types.FunctionType, types.BuiltinFunctionType]: + if not isinstance( + obj_type, (type, types.FunctionType, types.BuiltinFunctionType)): raise TypeError("obj must be a class or a function type, got " f"{obj_type}") @@ -156,8 +158,9 @@ def deprecated_warning_wrapper(obj): by a refactored version), prior to calling obj and returning its value. """ obj_type = type(obj) - #if obj_type not in [type, types.FunctionType, types.BuiltinFunctionType]: - if not isinstance(obj_type, (type, types.FunctionType, types.BuiltinFunctionType)): + # if obj_type not in [type, types.FunctionType, types.BuiltinFunctionType]: + if not isinstance( + obj_type, (type, types.FunctionType, types.BuiltinFunctionType)): raise TypeError("obj must be a class or a function type, got " f"{obj_type}") diff --git a/python/pylibcugraph/setup.py b/python/pylibcugraph/setup.py index bbb2d1816e1..2e7ede9284b 100644 --- a/python/pylibcugraph/setup.py +++ b/python/pylibcugraph/setup.py @@ -12,18 +12,17 @@ # limitations under the License. import os -import sys import shutil from setuptools import find_packages, Command from skbuild import setup -#FIXME: Not necessary +# FIXME: Not necessary from skbuild.command.build_ext import build_ext -from setuputils import get_environment_option, get_cuda_version_from_header +from setuputils import get_environment_option +# from setuputils import get_cuda_version_from_header import versioneer -from distutils.sysconfig import get_python_lib INSTALL_REQUIRES = [] # CYTHON_FILES = ['pylibcugraph/**/*.pyx'] @@ -75,6 +74,7 @@ ) """ + class CleanCommand(Command): """Custom clean command to tidy up the project root.""" user_options = [('all', None, None), ] diff --git a/python/pylibcugraph/setuputils.py b/python/pylibcugraph/setuputils.py index 2a6b927416e..279aca1bbe4 100644 --- a/python/pylibcugraph/setuputils.py +++ b/python/pylibcugraph/setuputils.py @@ -246,6 +246,7 @@ def _get_repo_path(): python_dir = Path(__file__).resolve().parent return str(python_dir.parent.parent.absolute()) + def get_cuda_version_from_header(cuda_include_dir, delimeter=""): cuda_version = None From aa5759b365c122f0ef80e98d17ba3bc4691ead85 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Wed, 29 Jun 2022 14:33:21 -0700 Subject: [PATCH 18/90] add cmake and scikit-build to the list of packages to install --- conda/environments/cugraph_dev_cuda11.2.yml | 2 ++ conda/environments/cugraph_dev_cuda11.4.yml | 2 ++ conda/recipes/cugraph/meta.yaml | 2 ++ conda/recipes/pylibcugraph/meta.yaml | 2 ++ python/cugraph/pyproject.toml | 2 +- python/cugraph/setup.py | 1 + python/pylibcugraph/pyproject.toml | 2 +- 7 files changed, 11 insertions(+), 2 deletions(-) diff --git a/conda/environments/cugraph_dev_cuda11.2.yml b/conda/environments/cugraph_dev_cuda11.2.yml index 962a647c08d..b36f7c52a80 100644 --- a/conda/environments/cugraph_dev_cuda11.2.yml +++ b/conda/environments/cugraph_dev_cuda11.2.yml @@ -26,6 +26,8 @@ dependencies: - clang=11.1.0 - clang-tools=11.1.0 - cmake>=3.20.1,!=3.23.0 +- cmake_setuptools>=0.1.3 +- scikit-build>=0.13.1 - python>=3.6,<3.9 - notebook>=0.5.0 - boost diff --git a/conda/environments/cugraph_dev_cuda11.4.yml b/conda/environments/cugraph_dev_cuda11.4.yml index b77ba7561c2..243f3f4cfec 100644 --- a/conda/environments/cugraph_dev_cuda11.4.yml +++ b/conda/environments/cugraph_dev_cuda11.4.yml @@ -26,6 +26,8 @@ dependencies: - clang=11.1.0 - clang-tools=11.1.0 - cmake>=3.20.1,!=3.23.0 +- cmake_setuptools>=0.1.3 +- scikit-build>=0.13.1 - python>=3.6,<3.9 - notebook>=0.5.0 - boost diff --git a/conda/recipes/cugraph/meta.yaml b/conda/recipes/cugraph/meta.yaml index adb859195d6..043a02b011d 100644 --- a/conda/recipes/cugraph/meta.yaml +++ b/conda/recipes/cugraph/meta.yaml @@ -33,6 +33,8 @@ requirements: host: - python x.x - cython>=0.29,<0.30 + - cmake>=3.20.1,!=3.23.0 + - scikit-build>=0.13.1 - libcugraph={{ version }} - libraft-headers {{ minor_version }} - pyraft {{ minor_version }} diff --git a/conda/recipes/pylibcugraph/meta.yaml b/conda/recipes/pylibcugraph/meta.yaml index 6142500c9c6..2980f7282f8 100644 --- a/conda/recipes/pylibcugraph/meta.yaml +++ b/conda/recipes/pylibcugraph/meta.yaml @@ -33,6 +33,8 @@ requirements: host: - python x.x - cython>=0.29,<0.30 + - cmake>=3.20.1,!=3.23.0 + - scikit-build>=0.13.1 - libcugraph={{ version }} - ucx-py {{ ucx_py_version }} - ucx-proc=*=gpu diff --git a/python/cugraph/pyproject.toml b/python/cugraph/pyproject.toml index f2b9306f7ca..c120e900a5f 100644 --- a/python/cugraph/pyproject.toml +++ b/python/cugraph/pyproject.toml @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2022, NVIDIA CORPORATION. +# Copyright (c) 2022, NVIDIA CORPORATION. [build-system] diff --git a/python/cugraph/setup.py b/python/cugraph/setup.py index e292a8af4fa..2f1332fab07 100644 --- a/python/cugraph/setup.py +++ b/python/cugraph/setup.py @@ -101,6 +101,7 @@ def run(self): cmdclass["clean"] = CleanCommand cmdclass["build_ext"] = build_ext +# FIXME: remove setup_requires, the .toml file does it setup(name='cugraph', description="cuGraph - RAPIDS GPU Graph Analytics", version=versioneer.get_version(), diff --git a/python/pylibcugraph/pyproject.toml b/python/pylibcugraph/pyproject.toml index f2b9306f7ca..c120e900a5f 100644 --- a/python/pylibcugraph/pyproject.toml +++ b/python/pylibcugraph/pyproject.toml @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2022, NVIDIA CORPORATION. +# Copyright (c) 2022, NVIDIA CORPORATION. [build-system] From 69a6e9a7551c1c4032279dbe7fe1596a5a957710 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Wed, 29 Jun 2022 15:37:15 -0700 Subject: [PATCH 19/90] add cupy-cuda --- build.sh | 6 ++++-- python/cugraph/setup.py | 4 ++-- python/pylibcugraph/setup.py | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index 777cae06080..d7f5896beff 100755 --- a/build.sh +++ b/build.sh @@ -159,6 +159,8 @@ if hasArg clean; then pushd ${REPODIR}/python > /dev/null rm -rf dist dask-worker-space cugraph/raft *.egg-info find . -name "__pycache__" -type d -exec rm -rf {} \; > /dev/null 2>&1 + find . -type d -name _skbuild -exec rm -rf {} \; > /dev/null 2>&1 + find . -type d -name dist -exec rm -rf {} \; > /dev/null 2>&1 find . -name "*.cpp" -type f -delete find . -name "*.cpython*.so" -type f -delete find . -type d -name _external_repositories -exec rm -rf {} \; > /dev/null 2>&1 @@ -231,7 +233,7 @@ if buildAll || hasArg pylibcugraph; then # build. If not set by the user, set it to LIBCUGRAPH_BUILD_DIR CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH:=${LIBCUGRAPH_BUILD_DIR}} python setup.py build_ext --inplace --library-dir=${LIBCUGRAPH_BUILD_DIR} \ - -- -DFIND_CUGRAPH_CPP=ON -Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} + -- -DFIND_CUGRAPH_CPP=ON -Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} -- -j${PARALLEL_LEVEL:-1} if [[ ${INSTALL_TARGET} != "" ]]; then env CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH} python setup.py install fi @@ -245,7 +247,7 @@ if buildAll || hasArg cugraph; then # build. If not set by the user, set it to LIBCUGRAPH_BUILD_DIR CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH:=${LIBCUGRAPH_BUILD_DIR}} python setup.py build_ext --inplace --library-dir=${LIBCUGRAPH_BUILD_DIR} \ - -- -DFIND_CUGRAPH_CPP=ON -Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} + -- -DFIND_CUGRAPH_CPP=ON -Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} -- -j${PARALLEL_LEVEL:-1} if [[ ${INSTALL_TARGET} != "" ]]; then env CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH} python setup.py install fi diff --git a/python/cugraph/setup.py b/python/cugraph/setup.py index 2f1332fab07..f197763c584 100644 --- a/python/cugraph/setup.py +++ b/python/cugraph/setup.py @@ -67,11 +67,11 @@ cuda_include_dir = os.path.join(CUDA_HOME, "include") # FIXME: This is causing a second version of cupy to be installed cupy-cuda115 -""" + INSTALL_REQUIRES.append( "cupy-cuda" + get_cuda_version_from_header(cuda_include_dir) ) -""" + class CleanCommand(Command): diff --git a/python/pylibcugraph/setup.py b/python/pylibcugraph/setup.py index 2e7ede9284b..862d5eaf177 100644 --- a/python/pylibcugraph/setup.py +++ b/python/pylibcugraph/setup.py @@ -68,11 +68,11 @@ cuda_include_dir = os.path.join(CUDA_HOME, "include") # FIXME: This is causing a second version of cupy to be installed cupy-cuda115 -""" + INSTALL_REQUIRES.append( "cupy-cuda" + get_cuda_version_from_header(cuda_include_dir) ) -""" + class CleanCommand(Command): From e650bc8381200160884f4453d9050a2fe8b888a6 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Wed, 29 Jun 2022 15:40:22 -0700 Subject: [PATCH 20/90] update install_requires --- python/pylibcugraph/setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/pylibcugraph/setup.py b/python/pylibcugraph/setup.py index 862d5eaf177..a78902efe32 100644 --- a/python/pylibcugraph/setup.py +++ b/python/pylibcugraph/setup.py @@ -117,6 +117,7 @@ def run(self): author="NVIDIA Corporation", setup_requires=['Cython>=0.29,<0.30'], packages=find_packages(include=['pylibcugraph', 'pylibcugraph.*']), + install_requires=INSTALL_REQUIRES, package_data={ key: ["*.pxd"] for key in find_packages(include=["pylibcugraph*"]) }, From 9741795fd35e00651c7a9378fbd19863ff3a3acf Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Wed, 29 Jun 2022 15:55:39 -0700 Subject: [PATCH 21/90] fix flake8 --- python/cugraph/setup.py | 1 - python/pylibcugraph/setup.py | 1 - 2 files changed, 2 deletions(-) diff --git a/python/cugraph/setup.py b/python/cugraph/setup.py index f197763c584..5cd8e7e3ce8 100644 --- a/python/cugraph/setup.py +++ b/python/cugraph/setup.py @@ -73,7 +73,6 @@ ) - class CleanCommand(Command): """Custom clean command to tidy up the project root.""" user_options = [('all', None, None), ] diff --git a/python/pylibcugraph/setup.py b/python/pylibcugraph/setup.py index a78902efe32..0e940b87895 100644 --- a/python/pylibcugraph/setup.py +++ b/python/pylibcugraph/setup.py @@ -74,7 +74,6 @@ ) - class CleanCommand(Command): """Custom clean command to tidy up the project root.""" user_options = [('all', None, None), ] From 6858db823d0412880be326e9ddcdd739e0cd3611 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Wed, 29 Jun 2022 15:59:40 -0700 Subject: [PATCH 22/90] import get_cuda_version_from_header --- python/cugraph/setup.py | 2 +- python/pylibcugraph/setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/cugraph/setup.py b/python/cugraph/setup.py index 5cd8e7e3ce8..a08fec47c2d 100644 --- a/python/cugraph/setup.py +++ b/python/cugraph/setup.py @@ -18,7 +18,7 @@ from skbuild import setup from setuputils import get_environment_option -# from setuputils import get_cuda_version_from_header +from setuputils import get_cuda_version_from_header # FIXME: Not necessary from skbuild.command.build_ext import build_ext diff --git a/python/pylibcugraph/setup.py b/python/pylibcugraph/setup.py index 0e940b87895..e3a71221c82 100644 --- a/python/pylibcugraph/setup.py +++ b/python/pylibcugraph/setup.py @@ -20,7 +20,7 @@ from skbuild.command.build_ext import build_ext from setuputils import get_environment_option -# from setuputils import get_cuda_version_from_header +from setuputils import get_cuda_version_from_header import versioneer From 3171be3a449e42edfe319b82bcdc15a5f3ca1d92 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Wed, 29 Jun 2022 16:27:36 -0700 Subject: [PATCH 23/90] update build script --- build.sh | 6 ++++-- python/cugraph/setup.py | 5 +++-- python/pylibcugraph/setup.py | 8 ++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/build.sh b/build.sh index d7f5896beff..e3ca81edbdd 100755 --- a/build.sh +++ b/build.sh @@ -233,7 +233,8 @@ if buildAll || hasArg pylibcugraph; then # build. If not set by the user, set it to LIBCUGRAPH_BUILD_DIR CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH:=${LIBCUGRAPH_BUILD_DIR}} python setup.py build_ext --inplace --library-dir=${LIBCUGRAPH_BUILD_DIR} \ - -- -DFIND_CUGRAPH_CPP=ON -Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} -- -j${PARALLEL_LEVEL:-1} + -- -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} -DFIND_CUGRAPH_CPP=ON \ + -Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} -- -j${PARALLEL_LEVEL:-1} if [[ ${INSTALL_TARGET} != "" ]]; then env CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH} python setup.py install fi @@ -247,7 +248,8 @@ if buildAll || hasArg cugraph; then # build. If not set by the user, set it to LIBCUGRAPH_BUILD_DIR CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH:=${LIBCUGRAPH_BUILD_DIR}} python setup.py build_ext --inplace --library-dir=${LIBCUGRAPH_BUILD_DIR} \ - -- -DFIND_CUGRAPH_CPP=ON -Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} -- -j${PARALLEL_LEVEL:-1} + -- -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} -DFIND_CUGRAPH_CPP=ON \ + -Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} -- -j${PARALLEL_LEVEL:-1} if [[ ${INSTALL_TARGET} != "" ]]; then env CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH} python setup.py install fi diff --git a/python/cugraph/setup.py b/python/cugraph/setup.py index a08fec47c2d..2f1332fab07 100644 --- a/python/cugraph/setup.py +++ b/python/cugraph/setup.py @@ -18,7 +18,7 @@ from skbuild import setup from setuputils import get_environment_option -from setuputils import get_cuda_version_from_header +# from setuputils import get_cuda_version_from_header # FIXME: Not necessary from skbuild.command.build_ext import build_ext @@ -67,10 +67,11 @@ cuda_include_dir = os.path.join(CUDA_HOME, "include") # FIXME: This is causing a second version of cupy to be installed cupy-cuda115 - +""" INSTALL_REQUIRES.append( "cupy-cuda" + get_cuda_version_from_header(cuda_include_dir) ) +""" class CleanCommand(Command): diff --git a/python/pylibcugraph/setup.py b/python/pylibcugraph/setup.py index e3a71221c82..78343c03fd0 100644 --- a/python/pylibcugraph/setup.py +++ b/python/pylibcugraph/setup.py @@ -20,11 +20,11 @@ from skbuild.command.build_ext import build_ext from setuputils import get_environment_option -from setuputils import get_cuda_version_from_header +# from setuputils import get_cuda_version_from_header import versioneer -INSTALL_REQUIRES = [] +# INSTALL_REQUIRES = [] # CYTHON_FILES = ['pylibcugraph/**/*.pyx'] UCX_HOME = get_environment_option("UCX_HOME") @@ -68,10 +68,11 @@ cuda_include_dir = os.path.join(CUDA_HOME, "include") # FIXME: This is causing a second version of cupy to be installed cupy-cuda115 - +""" INSTALL_REQUIRES.append( "cupy-cuda" + get_cuda_version_from_header(cuda_include_dir) ) +""" class CleanCommand(Command): @@ -116,7 +117,6 @@ def run(self): author="NVIDIA Corporation", setup_requires=['Cython>=0.29,<0.30'], packages=find_packages(include=['pylibcugraph', 'pylibcugraph.*']), - install_requires=INSTALL_REQUIRES, package_data={ key: ["*.pxd"] for key in find_packages(include=["pylibcugraph*"]) }, From 1e5b85e69ae049b921aff007a5dabfc2da071b65 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Wed, 29 Jun 2022 18:00:29 -0700 Subject: [PATCH 24/90] remove install prefix --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index e3ca81edbdd..772f537dc2b 100755 --- a/build.sh +++ b/build.sh @@ -248,7 +248,7 @@ if buildAll || hasArg cugraph; then # build. If not set by the user, set it to LIBCUGRAPH_BUILD_DIR CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH:=${LIBCUGRAPH_BUILD_DIR}} python setup.py build_ext --inplace --library-dir=${LIBCUGRAPH_BUILD_DIR} \ - -- -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} -DFIND_CUGRAPH_CPP=ON \ + -- -DFIND_CUGRAPH_CPP=ON \ -Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} -- -j${PARALLEL_LEVEL:-1} if [[ ${INSTALL_TARGET} != "" ]]; then env CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH} python setup.py install From 488a8af5d21fb3efdf734fd42af9fbea2cfcf45e Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Wed, 29 Jun 2022 18:15:51 -0700 Subject: [PATCH 25/90] remove install prefix from pylibcugraph build --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 772f537dc2b..319c12675ee 100755 --- a/build.sh +++ b/build.sh @@ -233,7 +233,7 @@ if buildAll || hasArg pylibcugraph; then # build. If not set by the user, set it to LIBCUGRAPH_BUILD_DIR CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH:=${LIBCUGRAPH_BUILD_DIR}} python setup.py build_ext --inplace --library-dir=${LIBCUGRAPH_BUILD_DIR} \ - -- -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} -DFIND_CUGRAPH_CPP=ON \ + -- -DFIND_CUGRAPH_CPP=ON \ -Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} -- -j${PARALLEL_LEVEL:-1} if [[ ${INSTALL_TARGET} != "" ]]; then env CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH} python setup.py install From bd9783ab5a4d68915acd155d7f791b3f9f26c401 Mon Sep 17 00:00:00 2001 From: Charles Hastings Date: Mon, 11 Jul 2022 08:21:17 -0700 Subject: [PATCH 26/90] move primities out of cugraph public API --- .../centrality/eigenvector_centrality_impl.cuh | 15 ++++++++------- cpp/src/centrality/katz_centrality_impl.cuh | 11 ++++++----- cpp/src/community/louvain.cuh | 15 +++++++-------- cpp/src/community/triangle_count_impl.cuh | 7 ++++--- .../weakly_connected_components_impl.cuh | 11 ++++++----- cpp/src/cores/core_number_impl.cuh | 13 +++++++------ cpp/src/link_analysis/hits_impl.cuh | 13 +++++++------ cpp/src/link_analysis/pagerank_impl.cuh | 15 ++++++++------- .../cugraph => src}/prims/count_if_e.cuh | 5 +++-- .../cugraph => src}/prims/count_if_v.cuh | 0 .../prims/detail/nbr_intersection.cuh | 0 .../prims/edge_partition_src_dst_property.cuh | 0 .../cugraph => src}/prims/extract_if_e.cuh | 7 ++++--- ...orm_reduce_dst_key_aggregated_outgoing_e.cuh | 2 +- ...r_v_transform_reduce_incoming_outgoing_e.cuh | 7 ++++--- .../cugraph => src}/prims/property_op_utils.cuh | 0 .../cugraph => src}/prims/reduce_op.cuh | 2 +- cpp/{include/cugraph => src}/prims/reduce_v.cuh | 5 +++-- ...dst_nbr_intersection_of_e_endpoints_by_v.cuh | 7 ++++--- .../prims/transform_reduce_e.cuh | 3 ++- .../prims/transform_reduce_e_by_src_dst_key.cuh | 3 ++- .../prims/transform_reduce_v.cuh | 5 +++-- ...form_reduce_v_frontier_outgoing_e_by_dst.cuh | 7 ++++--- .../update_edge_partition_src_dst_property.cuh | 3 ++- .../cugraph => src}/prims/update_v_frontier.cuh | 0 .../cugraph => src}/prims/vertex_frontier.cuh | 0 cpp/src/structure/coarsen_graph_impl.cuh | 5 +++-- cpp/src/structure/graph_view_impl.cuh | 7 ++++--- cpp/src/traversal/bfs_impl.cuh | 13 +++++++------ cpp/src/traversal/sssp_impl.cuh | 17 +++++++++-------- cpp/tests/prims/mg_count_if_e.cu | 7 ++++--- cpp/tests/prims/mg_count_if_v.cu | 3 ++- cpp/tests/prims/mg_extract_if_e.cu | 7 ++++--- ...er_v_transform_reduce_incoming_outgoing_e.cu | 7 ++++--- cpp/tests/prims/mg_reduce_v.cu | 5 +++-- cpp/tests/prims/mg_transform_reduce_e.cu | 7 ++++--- cpp/tests/prims/mg_transform_reduce_v.cu | 3 ++- ...sform_reduce_v_frontier_outgoing_e_by_dst.cu | 9 +++++---- 38 files changed, 137 insertions(+), 109 deletions(-) rename cpp/{include/cugraph => src}/prims/count_if_e.cuh (97%) rename cpp/{include/cugraph => src}/prims/count_if_v.cuh (100%) rename cpp/{include/cugraph => src}/prims/detail/nbr_intersection.cuh (100%) rename cpp/{include/cugraph => src}/prims/edge_partition_src_dst_property.cuh (100%) rename cpp/{include/cugraph => src}/prims/extract_if_e.cuh (98%) rename cpp/{include/cugraph => src}/prims/per_v_transform_reduce_dst_key_aggregated_outgoing_e.cuh (99%) rename cpp/{include/cugraph => src}/prims/per_v_transform_reduce_incoming_outgoing_e.cuh (99%) rename cpp/{include/cugraph => src}/prims/property_op_utils.cuh (100%) rename cpp/{include/cugraph => src}/prims/reduce_op.cuh (99%) rename cpp/{include/cugraph => src}/prims/reduce_v.cuh (99%) rename cpp/{include/cugraph => src}/prims/transform_reduce_dst_nbr_intersection_of_e_endpoints_by_v.cuh (99%) rename cpp/{include/cugraph => src}/prims/transform_reduce_e.cuh (99%) rename cpp/{include/cugraph => src}/prims/transform_reduce_e_by_src_dst_key.cuh (99%) rename cpp/{include/cugraph => src}/prims/transform_reduce_v.cuh (98%) rename cpp/{include/cugraph => src}/prims/transform_reduce_v_frontier_outgoing_e_by_dst.cuh (99%) rename cpp/{include/cugraph => src}/prims/update_edge_partition_src_dst_property.cuh (99%) rename cpp/{include/cugraph => src}/prims/update_v_frontier.cuh (100%) rename cpp/{include/cugraph => src}/prims/vertex_frontier.cuh (100%) diff --git a/cpp/src/centrality/eigenvector_centrality_impl.cuh b/cpp/src/centrality/eigenvector_centrality_impl.cuh index 06cd7fb7f3d..bb51ac8454f 100644 --- a/cpp/src/centrality/eigenvector_centrality_impl.cuh +++ b/cpp/src/centrality/eigenvector_centrality_impl.cuh @@ -15,16 +15,17 @@ */ #pragma once +#include +#include +#include +#include +#include +#include +#include + #include #include #include -#include -#include -#include -#include -#include -#include -#include #include #include diff --git a/cpp/src/centrality/katz_centrality_impl.cuh b/cpp/src/centrality/katz_centrality_impl.cuh index dc4bac49d1b..b228258bada 100644 --- a/cpp/src/centrality/katz_centrality_impl.cuh +++ b/cpp/src/centrality/katz_centrality_impl.cuh @@ -15,13 +15,14 @@ */ #pragma once +#include +#include +#include +#include +#include + #include #include -#include -#include -#include -#include -#include #include #include diff --git a/cpp/src/community/louvain.cuh b/cpp/src/community/louvain.cuh index e52a3703f18..28ac0598dc4 100644 --- a/cpp/src/community/louvain.cuh +++ b/cpp/src/community/louvain.cuh @@ -15,17 +15,16 @@ */ #pragma once -#include +#include +#include +#include +#include +#include +#include +#include #include #include - -#include -#include -#include -#include -#include -#include #include #include diff --git a/cpp/src/community/triangle_count_impl.cuh b/cpp/src/community/triangle_count_impl.cuh index 0231102c71c..731180a9e90 100644 --- a/cpp/src/community/triangle_count_impl.cuh +++ b/cpp/src/community/triangle_count_impl.cuh @@ -15,12 +15,13 @@ */ #pragma once +#include +#include +#include + #include #include #include -#include -#include -#include #include #include diff --git a/cpp/src/components/weakly_connected_components_impl.cuh b/cpp/src/components/weakly_connected_components_impl.cuh index b1ab7883768..5cd504ac3b8 100644 --- a/cpp/src/components/weakly_connected_components_impl.cuh +++ b/cpp/src/components/weakly_connected_components_impl.cuh @@ -15,15 +15,16 @@ */ #pragma once +#include +#include +#include +#include +#include + #include #include #include #include -#include -#include -#include -#include -#include #include #include #include diff --git a/cpp/src/cores/core_number_impl.cuh b/cpp/src/cores/core_number_impl.cuh index e172886b439..8b1df19ba40 100644 --- a/cpp/src/cores/core_number_impl.cuh +++ b/cpp/src/cores/core_number_impl.cuh @@ -15,14 +15,15 @@ */ #pragma once +#include +#include +#include +#include +#include +#include + #include #include -#include -#include -#include -#include -#include -#include #include #include diff --git a/cpp/src/link_analysis/hits_impl.cuh b/cpp/src/link_analysis/hits_impl.cuh index 06c1d47504c..c5dd139ab12 100644 --- a/cpp/src/link_analysis/hits_impl.cuh +++ b/cpp/src/link_analysis/hits_impl.cuh @@ -15,14 +15,15 @@ */ #pragma once +#include +#include +#include +#include +#include +#include + #include #include -#include -#include -#include -#include -#include -#include #include #include diff --git a/cpp/src/link_analysis/pagerank_impl.cuh b/cpp/src/link_analysis/pagerank_impl.cuh index c5426ed3e7b..fce8b6743e2 100644 --- a/cpp/src/link_analysis/pagerank_impl.cuh +++ b/cpp/src/link_analysis/pagerank_impl.cuh @@ -15,15 +15,16 @@ */ #pragma once +#include +#include +#include +#include +#include +#include +#include + #include #include -#include -#include -#include -#include -#include -#include -#include #include #include diff --git a/cpp/include/cugraph/prims/count_if_e.cuh b/cpp/src/prims/count_if_e.cuh similarity index 97% rename from cpp/include/cugraph/prims/count_if_e.cuh rename to cpp/src/prims/count_if_e.cuh index 5155beadb94..45c00db6e56 100644 --- a/cpp/include/cugraph/prims/count_if_e.cuh +++ b/cpp/src/prims/count_if_e.cuh @@ -15,9 +15,10 @@ */ #pragma once +#include +#include + #include -#include -#include #include diff --git a/cpp/include/cugraph/prims/count_if_v.cuh b/cpp/src/prims/count_if_v.cuh similarity index 100% rename from cpp/include/cugraph/prims/count_if_v.cuh rename to cpp/src/prims/count_if_v.cuh diff --git a/cpp/include/cugraph/prims/detail/nbr_intersection.cuh b/cpp/src/prims/detail/nbr_intersection.cuh similarity index 100% rename from cpp/include/cugraph/prims/detail/nbr_intersection.cuh rename to cpp/src/prims/detail/nbr_intersection.cuh diff --git a/cpp/include/cugraph/prims/edge_partition_src_dst_property.cuh b/cpp/src/prims/edge_partition_src_dst_property.cuh similarity index 100% rename from cpp/include/cugraph/prims/edge_partition_src_dst_property.cuh rename to cpp/src/prims/edge_partition_src_dst_property.cuh diff --git a/cpp/include/cugraph/prims/extract_if_e.cuh b/cpp/src/prims/extract_if_e.cuh similarity index 98% rename from cpp/include/cugraph/prims/extract_if_e.cuh rename to cpp/src/prims/extract_if_e.cuh index 501218f7066..963746a949f 100644 --- a/cpp/include/cugraph/prims/extract_if_e.cuh +++ b/cpp/src/prims/extract_if_e.cuh @@ -15,12 +15,13 @@ */ #pragma once +#include +#include +#include + #include #include #include -#include -#include -#include #include #include diff --git a/cpp/include/cugraph/prims/per_v_transform_reduce_dst_key_aggregated_outgoing_e.cuh b/cpp/src/prims/per_v_transform_reduce_dst_key_aggregated_outgoing_e.cuh similarity index 99% rename from cpp/include/cugraph/prims/per_v_transform_reduce_dst_key_aggregated_outgoing_e.cuh rename to cpp/src/prims/per_v_transform_reduce_dst_key_aggregated_outgoing_e.cuh index 19966783719..e0b539536c0 100644 --- a/cpp/include/cugraph/prims/per_v_transform_reduce_dst_key_aggregated_outgoing_e.cuh +++ b/cpp/src/prims/per_v_transform_reduce_dst_key_aggregated_outgoing_e.cuh @@ -206,7 +206,7 @@ struct reduce_with_init_t { * (aggregated over the entire set of processes in multi-GPU). * @param init Initial value to be reduced with the reduced value for each vertex. * @param reduce_op Binary operator that takes two input arguments and reduce the two values to one. - * There are pre-defined reduction operators in include/cugraph/prims/reduce_op.cuh. It is + * There are pre-defined reduction operators in src/prims/reduce_op.cuh. It is * recommended to use the pre-defined reduction operators whenever possible as the current (and * future) implementations of graph primitives may check whether @p ReduceOp is a known type (or has * known member variables) to take a more optimized code path. See the documentation in the diff --git a/cpp/include/cugraph/prims/per_v_transform_reduce_incoming_outgoing_e.cuh b/cpp/src/prims/per_v_transform_reduce_incoming_outgoing_e.cuh similarity index 99% rename from cpp/include/cugraph/prims/per_v_transform_reduce_incoming_outgoing_e.cuh rename to cpp/src/prims/per_v_transform_reduce_incoming_outgoing_e.cuh index 48e4dd83320..5d19cc5f01c 100644 --- a/cpp/include/cugraph/prims/per_v_transform_reduce_incoming_outgoing_e.cuh +++ b/cpp/src/prims/per_v_transform_reduce_incoming_outgoing_e.cuh @@ -15,12 +15,13 @@ */ #pragma once +#include +#include +#include + #include #include #include -#include -#include -#include #include #include #include diff --git a/cpp/include/cugraph/prims/property_op_utils.cuh b/cpp/src/prims/property_op_utils.cuh similarity index 100% rename from cpp/include/cugraph/prims/property_op_utils.cuh rename to cpp/src/prims/property_op_utils.cuh diff --git a/cpp/include/cugraph/prims/reduce_op.cuh b/cpp/src/prims/reduce_op.cuh similarity index 99% rename from cpp/include/cugraph/prims/reduce_op.cuh rename to cpp/src/prims/reduce_op.cuh index 6380c33df1f..62aa04f4481 100644 --- a/cpp/include/cugraph/prims/reduce_op.cuh +++ b/cpp/src/prims/reduce_op.cuh @@ -16,7 +16,7 @@ #pragma once -#include +#include #include diff --git a/cpp/include/cugraph/prims/reduce_v.cuh b/cpp/src/prims/reduce_v.cuh similarity index 99% rename from cpp/include/cugraph/prims/reduce_v.cuh rename to cpp/src/prims/reduce_v.cuh index 77be3a26157..b11ec8924e7 100644 --- a/cpp/include/cugraph/prims/reduce_v.cuh +++ b/cpp/src/prims/reduce_v.cuh @@ -15,9 +15,10 @@ */ #pragma once +#include +#include + #include -#include -#include #include #include diff --git a/cpp/include/cugraph/prims/transform_reduce_dst_nbr_intersection_of_e_endpoints_by_v.cuh b/cpp/src/prims/transform_reduce_dst_nbr_intersection_of_e_endpoints_by_v.cuh similarity index 99% rename from cpp/include/cugraph/prims/transform_reduce_dst_nbr_intersection_of_e_endpoints_by_v.cuh rename to cpp/src/prims/transform_reduce_dst_nbr_intersection_of_e_endpoints_by_v.cuh index e82bc025e92..75864fafe61 100644 --- a/cpp/include/cugraph/prims/transform_reduce_dst_nbr_intersection_of_e_endpoints_by_v.cuh +++ b/cpp/src/prims/transform_reduce_dst_nbr_intersection_of_e_endpoints_by_v.cuh @@ -15,12 +15,13 @@ */ #pragma once +#include +#include +#include + #include #include #include -#include -#include -#include #include #include diff --git a/cpp/include/cugraph/prims/transform_reduce_e.cuh b/cpp/src/prims/transform_reduce_e.cuh similarity index 99% rename from cpp/include/cugraph/prims/transform_reduce_e.cuh rename to cpp/src/prims/transform_reduce_e.cuh index dda566634b7..d3ec9d238c0 100644 --- a/cpp/include/cugraph/prims/transform_reduce_e.cuh +++ b/cpp/src/prims/transform_reduce_e.cuh @@ -15,10 +15,11 @@ */ #pragma once +#include + #include #include #include -#include #include #include #include diff --git a/cpp/include/cugraph/prims/transform_reduce_e_by_src_dst_key.cuh b/cpp/src/prims/transform_reduce_e_by_src_dst_key.cuh similarity index 99% rename from cpp/include/cugraph/prims/transform_reduce_e_by_src_dst_key.cuh rename to cpp/src/prims/transform_reduce_e_by_src_dst_key.cuh index 66771ea42d7..3145f5ee11d 100644 --- a/cpp/include/cugraph/prims/transform_reduce_e_by_src_dst_key.cuh +++ b/cpp/src/prims/transform_reduce_e_by_src_dst_key.cuh @@ -15,10 +15,11 @@ */ #pragma once +#include + #include #include #include -#include #include #include #include diff --git a/cpp/include/cugraph/prims/transform_reduce_v.cuh b/cpp/src/prims/transform_reduce_v.cuh similarity index 98% rename from cpp/include/cugraph/prims/transform_reduce_v.cuh rename to cpp/src/prims/transform_reduce_v.cuh index 9f44c666382..be573bfd021 100644 --- a/cpp/include/cugraph/prims/transform_reduce_v.cuh +++ b/cpp/src/prims/transform_reduce_v.cuh @@ -15,9 +15,10 @@ */ #pragma once +#include +#include + #include -#include -#include #include #include diff --git a/cpp/include/cugraph/prims/transform_reduce_v_frontier_outgoing_e_by_dst.cuh b/cpp/src/prims/transform_reduce_v_frontier_outgoing_e_by_dst.cuh similarity index 99% rename from cpp/include/cugraph/prims/transform_reduce_v_frontier_outgoing_e_by_dst.cuh rename to cpp/src/prims/transform_reduce_v_frontier_outgoing_e_by_dst.cuh index 3f6e83b126c..f9eda71cb2d 100644 --- a/cpp/include/cugraph/prims/transform_reduce_v_frontier_outgoing_e_by_dst.cuh +++ b/cpp/src/prims/transform_reduce_v_frontier_outgoing_e_by_dst.cuh @@ -15,11 +15,12 @@ */ #pragma once +#include +#include + #include #include #include -#include -#include #include #include #include @@ -945,7 +946,7 @@ typename GraphViewType::edge_type compute_num_out_nbrs_from_frontier( * ReduceOp::value_type is not void); or 5) a tuple of a tag and a value to be reduced (if vertices * are tagged and ReduceOp::value_type is not void). * @param reduce_op Binary operator that takes two input arguments and reduce the two values to one. - * There are pre-defined reduction operators in include/cugraph/prims/reduce_op.cuh. It is + * There are pre-defined reduction operators in prims/reduce_op.cuh. It is * recommended to use the pre-defined reduction operators whenever possible as the current (and * future) implementations of graph primitives may check whether @p ReduceOp is a known type (or has * known member variables) to take a more optimized code path. See the documentation in the diff --git a/cpp/include/cugraph/prims/update_edge_partition_src_dst_property.cuh b/cpp/src/prims/update_edge_partition_src_dst_property.cuh similarity index 99% rename from cpp/include/cugraph/prims/update_edge_partition_src_dst_property.cuh rename to cpp/src/prims/update_edge_partition_src_dst_property.cuh index 6b5a5482a1a..3b13bf192b5 100644 --- a/cpp/include/cugraph/prims/update_edge_partition_src_dst_property.cuh +++ b/cpp/src/prims/update_edge_partition_src_dst_property.cuh @@ -15,10 +15,11 @@ */ #pragma once +#include + #include #include #include -#include #include #include #include diff --git a/cpp/include/cugraph/prims/update_v_frontier.cuh b/cpp/src/prims/update_v_frontier.cuh similarity index 100% rename from cpp/include/cugraph/prims/update_v_frontier.cuh rename to cpp/src/prims/update_v_frontier.cuh diff --git a/cpp/include/cugraph/prims/vertex_frontier.cuh b/cpp/src/prims/vertex_frontier.cuh similarity index 100% rename from cpp/include/cugraph/prims/vertex_frontier.cuh rename to cpp/src/prims/vertex_frontier.cuh diff --git a/cpp/src/structure/coarsen_graph_impl.cuh b/cpp/src/structure/coarsen_graph_impl.cuh index e2b8f1c4edb..783df241283 100644 --- a/cpp/src/structure/coarsen_graph_impl.cuh +++ b/cpp/src/structure/coarsen_graph_impl.cuh @@ -15,14 +15,15 @@ */ #pragma once +#include +#include + #include #include #include #include #include #include -#include -#include #include #include diff --git a/cpp/src/structure/graph_view_impl.cuh b/cpp/src/structure/graph_view_impl.cuh index 6629019c861..0dffd6d537c 100644 --- a/cpp/src/structure/graph_view_impl.cuh +++ b/cpp/src/structure/graph_view_impl.cuh @@ -16,14 +16,15 @@ #pragma once +#include +#include +#include + #include #include #include #include #include -#include -#include -#include #include #include diff --git a/cpp/src/traversal/bfs_impl.cuh b/cpp/src/traversal/bfs_impl.cuh index 3d49390786d..7ca0cab8ddb 100644 --- a/cpp/src/traversal/bfs_impl.cuh +++ b/cpp/src/traversal/bfs_impl.cuh @@ -15,14 +15,15 @@ */ #pragma once +#include +#include +#include +#include +#include +#include + #include #include -#include -#include -#include -#include -#include -#include #include #include diff --git a/cpp/src/traversal/sssp_impl.cuh b/cpp/src/traversal/sssp_impl.cuh index 5fb6ef37a6b..457f8f8051c 100644 --- a/cpp/src/traversal/sssp_impl.cuh +++ b/cpp/src/traversal/sssp_impl.cuh @@ -15,16 +15,17 @@ */ #pragma once +#include +#include +#include +#include +#include +#include +#include +#include + #include #include -#include -#include -#include -#include -#include -#include -#include -#include #include #include diff --git a/cpp/tests/prims/mg_count_if_e.cu b/cpp/tests/prims/mg_count_if_e.cu index 954f7be47f6..61f7ccfa6e6 100644 --- a/cpp/tests/prims/mg_count_if_e.cu +++ b/cpp/tests/prims/mg_count_if_e.cu @@ -21,6 +21,10 @@ #include #include +#include +#include +#include + #include #include #include @@ -28,9 +32,6 @@ #include #include #include -#include -#include -#include #include #include diff --git a/cpp/tests/prims/mg_count_if_v.cu b/cpp/tests/prims/mg_count_if_v.cu index a7de0024b81..5b127b805b3 100644 --- a/cpp/tests/prims/mg_count_if_v.cu +++ b/cpp/tests/prims/mg_count_if_v.cu @@ -21,12 +21,13 @@ #include #include +#include + #include #include #include #include -#include #include #include diff --git a/cpp/tests/prims/mg_extract_if_e.cu b/cpp/tests/prims/mg_extract_if_e.cu index b8ceb673861..fc2479df985 100644 --- a/cpp/tests/prims/mg_extract_if_e.cu +++ b/cpp/tests/prims/mg_extract_if_e.cu @@ -21,14 +21,15 @@ #include #include +#include +#include +#include + #include #include #include #include -#include -#include -#include #include #include diff --git a/cpp/tests/prims/mg_per_v_transform_reduce_incoming_outgoing_e.cu b/cpp/tests/prims/mg_per_v_transform_reduce_incoming_outgoing_e.cu index a84737f72c6..b6132b9c870 100644 --- a/cpp/tests/prims/mg_per_v_transform_reduce_incoming_outgoing_e.cu +++ b/cpp/tests/prims/mg_per_v_transform_reduce_incoming_outgoing_e.cu @@ -21,6 +21,10 @@ #include #include +#include +#include +#include + #include #include #include @@ -28,9 +32,6 @@ #include #include #include -#include -#include -#include #include #include diff --git a/cpp/tests/prims/mg_reduce_v.cu b/cpp/tests/prims/mg_reduce_v.cu index 820f24b3952..2b240d5adae 100644 --- a/cpp/tests/prims/mg_reduce_v.cu +++ b/cpp/tests/prims/mg_reduce_v.cu @@ -21,13 +21,14 @@ #include #include +#include +#include + #include #include #include #include -#include -#include #include #include diff --git a/cpp/tests/prims/mg_transform_reduce_e.cu b/cpp/tests/prims/mg_transform_reduce_e.cu index 3255f55e7be..aad921e278d 100644 --- a/cpp/tests/prims/mg_transform_reduce_e.cu +++ b/cpp/tests/prims/mg_transform_reduce_e.cu @@ -21,6 +21,10 @@ #include #include +#include +#include +#include + #include #include #include @@ -28,9 +32,6 @@ #include #include #include -#include -#include -#include #include #include diff --git a/cpp/tests/prims/mg_transform_reduce_v.cu b/cpp/tests/prims/mg_transform_reduce_v.cu index 95cca0eb015..38742c721cc 100644 --- a/cpp/tests/prims/mg_transform_reduce_v.cu +++ b/cpp/tests/prims/mg_transform_reduce_v.cu @@ -21,12 +21,13 @@ #include #include +#include + #include #include #include #include -#include #include #include diff --git a/cpp/tests/prims/mg_transform_reduce_v_frontier_outgoing_e_by_dst.cu b/cpp/tests/prims/mg_transform_reduce_v_frontier_outgoing_e_by_dst.cu index cea70d516a8..a894e6ba693 100644 --- a/cpp/tests/prims/mg_transform_reduce_v_frontier_outgoing_e_by_dst.cu +++ b/cpp/tests/prims/mg_transform_reduce_v_frontier_outgoing_e_by_dst.cu @@ -21,6 +21,11 @@ #include #include +#include +#include +#include +#include + #include #include #include @@ -28,10 +33,6 @@ #include #include #include -#include -#include -#include -#include #include #include From 918187763edf470bb57016c24cb1757a735b878a Mon Sep 17 00:00:00 2001 From: Charles Hastings Date: Mon, 11 Jul 2022 09:00:20 -0700 Subject: [PATCH 27/90] move graph_utils out of public headers --- cpp/src/community/louvain.cuh | 2 +- cpp/src/components/weakly_connected_components_impl.cuh | 2 +- cpp/{include/cugraph => src}/detail/graph_utils.cuh | 0 cpp/src/detail/shuffle_wrappers.cu | 3 ++- .../per_v_transform_reduce_dst_key_aggregated_outgoing_e.cuh | 5 +++-- ...sform_reduce_dst_nbr_intersection_of_e_endpoints_by_v.cuh | 2 +- cpp/src/prims/transform_reduce_e_by_src_dst_key.cuh | 2 +- cpp/src/structure/coarsen_graph_impl.cuh | 2 +- cpp/src/structure/create_graph_from_edgelist_impl.cuh | 3 ++- cpp/src/structure/graph_impl.cuh | 3 ++- cpp/src/structure/graph_view_impl.cuh | 2 +- cpp/src/structure/relabel_impl.cuh | 3 ++- cpp/src/structure/renumber_edgelist_impl.cuh | 3 ++- cpp/src/structure/renumber_utils_impl.cuh | 5 +++-- cpp/src/traversal/extract_bfs_paths_impl.cuh | 4 ++-- cpp/{include/cugraph => src}/utilities/collect_comm.cuh | 0 cpp/src/utilities/cython.cu | 3 ++- cpp/tests/utilities/matrix_market_file_utilities.cu | 2 +- 18 files changed, 27 insertions(+), 19 deletions(-) rename cpp/{include/cugraph => src}/detail/graph_utils.cuh (100%) rename cpp/{include/cugraph => src}/utilities/collect_comm.cuh (100%) diff --git a/cpp/src/community/louvain.cuh b/cpp/src/community/louvain.cuh index 28ac0598dc4..0bd00eccc5c 100644 --- a/cpp/src/community/louvain.cuh +++ b/cpp/src/community/louvain.cuh @@ -21,11 +21,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/cpp/src/components/weakly_connected_components_impl.cuh b/cpp/src/components/weakly_connected_components_impl.cuh index 5cd504ac3b8..532babfc4b4 100644 --- a/cpp/src/components/weakly_connected_components_impl.cuh +++ b/cpp/src/components/weakly_connected_components_impl.cuh @@ -20,9 +20,9 @@ #include #include #include +#include #include -#include #include #include #include diff --git a/cpp/include/cugraph/detail/graph_utils.cuh b/cpp/src/detail/graph_utils.cuh similarity index 100% rename from cpp/include/cugraph/detail/graph_utils.cuh rename to cpp/src/detail/graph_utils.cuh diff --git a/cpp/src/detail/shuffle_wrappers.cu b/cpp/src/detail/shuffle_wrappers.cu index f834c5ab61f..c36e95d268f 100644 --- a/cpp/src/detail/shuffle_wrappers.cu +++ b/cpp/src/detail/shuffle_wrappers.cu @@ -13,7 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include +#include + #include #include #include diff --git a/cpp/src/prims/per_v_transform_reduce_dst_key_aggregated_outgoing_e.cuh b/cpp/src/prims/per_v_transform_reduce_dst_key_aggregated_outgoing_e.cuh index e0b539536c0..cfcc03b2dd9 100644 --- a/cpp/src/prims/per_v_transform_reduce_dst_key_aggregated_outgoing_e.cuh +++ b/cpp/src/prims/per_v_transform_reduce_dst_key_aggregated_outgoing_e.cuh @@ -15,11 +15,12 @@ */ #pragma once +#include +#include + #include -#include #include #include -#include #include #include #include diff --git a/cpp/src/prims/transform_reduce_dst_nbr_intersection_of_e_endpoints_by_v.cuh b/cpp/src/prims/transform_reduce_dst_nbr_intersection_of_e_endpoints_by_v.cuh index 75864fafe61..aa575ad1b5c 100644 --- a/cpp/src/prims/transform_reduce_dst_nbr_intersection_of_e_endpoints_by_v.cuh +++ b/cpp/src/prims/transform_reduce_dst_nbr_intersection_of_e_endpoints_by_v.cuh @@ -18,8 +18,8 @@ #include #include #include +#include -#include #include #include #include diff --git a/cpp/src/prims/transform_reduce_e_by_src_dst_key.cuh b/cpp/src/prims/transform_reduce_e_by_src_dst_key.cuh index 3145f5ee11d..f736445b07b 100644 --- a/cpp/src/prims/transform_reduce_e_by_src_dst_key.cuh +++ b/cpp/src/prims/transform_reduce_e_by_src_dst_key.cuh @@ -16,8 +16,8 @@ #pragma once #include +#include -#include #include #include #include diff --git a/cpp/src/structure/coarsen_graph_impl.cuh b/cpp/src/structure/coarsen_graph_impl.cuh index 783df241283..0fb06c977cd 100644 --- a/cpp/src/structure/coarsen_graph_impl.cuh +++ b/cpp/src/structure/coarsen_graph_impl.cuh @@ -17,9 +17,9 @@ #include #include +#include #include -#include #include #include #include diff --git a/cpp/src/structure/create_graph_from_edgelist_impl.cuh b/cpp/src/structure/create_graph_from_edgelist_impl.cuh index 28e0f1e807c..7e5f5201dcd 100644 --- a/cpp/src/structure/create_graph_from_edgelist_impl.cuh +++ b/cpp/src/structure/create_graph_from_edgelist_impl.cuh @@ -15,7 +15,8 @@ */ #pragma once -#include +#include + #include #include #include diff --git a/cpp/src/structure/graph_impl.cuh b/cpp/src/structure/graph_impl.cuh index 761e9327f75..271aece43c0 100644 --- a/cpp/src/structure/graph_impl.cuh +++ b/cpp/src/structure/graph_impl.cuh @@ -16,7 +16,8 @@ #pragma once -#include +#include + #include #include #include diff --git a/cpp/src/structure/graph_view_impl.cuh b/cpp/src/structure/graph_view_impl.cuh index 0dffd6d537c..0dad752157a 100644 --- a/cpp/src/structure/graph_view_impl.cuh +++ b/cpp/src/structure/graph_view_impl.cuh @@ -19,9 +19,9 @@ #include #include #include +#include #include -#include #include #include #include diff --git a/cpp/src/structure/relabel_impl.cuh b/cpp/src/structure/relabel_impl.cuh index cb5e7066dba..f989ef344c1 100644 --- a/cpp/src/structure/relabel_impl.cuh +++ b/cpp/src/structure/relabel_impl.cuh @@ -15,7 +15,8 @@ */ #pragma once -#include +#include + #include #include #include diff --git a/cpp/src/structure/renumber_edgelist_impl.cuh b/cpp/src/structure/renumber_edgelist_impl.cuh index 26b18f584f0..428c241f6ba 100644 --- a/cpp/src/structure/renumber_edgelist_impl.cuh +++ b/cpp/src/structure/renumber_edgelist_impl.cuh @@ -15,7 +15,8 @@ */ #pragma once -#include +#include + #include #include #include diff --git a/cpp/src/structure/renumber_utils_impl.cuh b/cpp/src/structure/renumber_utils_impl.cuh index 8204584b2a0..922c0cdfb96 100644 --- a/cpp/src/structure/renumber_utils_impl.cuh +++ b/cpp/src/structure/renumber_utils_impl.cuh @@ -15,10 +15,11 @@ */ #pragma once -#include +#include +#include + #include #include -#include #include #include diff --git a/cpp/src/traversal/extract_bfs_paths_impl.cuh b/cpp/src/traversal/extract_bfs_paths_impl.cuh index 22cdbc2101f..1e5b36bf212 100644 --- a/cpp/src/traversal/extract_bfs_paths_impl.cuh +++ b/cpp/src/traversal/extract_bfs_paths_impl.cuh @@ -16,12 +16,12 @@ #pragma once #include +#include +#include #include -#include #include #include -#include #include #include #include diff --git a/cpp/include/cugraph/utilities/collect_comm.cuh b/cpp/src/utilities/collect_comm.cuh similarity index 100% rename from cpp/include/cugraph/utilities/collect_comm.cuh rename to cpp/src/utilities/collect_comm.cuh diff --git a/cpp/src/utilities/cython.cu b/cpp/src/utilities/cython.cu index 58c562ec54a..161552374e0 100644 --- a/cpp/src/utilities/cython.cu +++ b/cpp/src/utilities/cython.cu @@ -14,8 +14,9 @@ * limitations under the License. */ +#include + #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 253e5a2f2fe..ae546973bf7 100644 --- a/cpp/tests/utilities/matrix_market_file_utilities.cu +++ b/cpp/tests/utilities/matrix_market_file_utilities.cu @@ -14,9 +14,9 @@ * limitations under the License. */ +#include #include -#include #include #include #include From 7a67e3f66c4bf798694a1dceffd2b0daf01a38de Mon Sep 17 00:00:00 2001 From: Charles Hastings Date: Mon, 11 Jul 2022 09:13:08 -0700 Subject: [PATCH 28/90] fix clang-format issues --- cpp/src/components/weakly_connected_components_impl.cuh | 2 +- .../per_v_transform_reduce_dst_key_aggregated_outgoing_e.cuh | 2 +- ...nsform_reduce_dst_nbr_intersection_of_e_endpoints_by_v.cuh | 2 +- cpp/src/prims/transform_reduce_e_by_src_dst_key.cuh | 2 +- cpp/src/structure/coarsen_graph_impl.cuh | 2 +- cpp/src/structure/graph_view_impl.cuh | 2 +- cpp/src/structure/renumber_utils_impl.cuh | 2 +- cpp/src/traversal/extract_bfs_paths_impl.cuh | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cpp/src/components/weakly_connected_components_impl.cuh b/cpp/src/components/weakly_connected_components_impl.cuh index 532babfc4b4..266ed4c2710 100644 --- a/cpp/src/components/weakly_connected_components_impl.cuh +++ b/cpp/src/components/weakly_connected_components_impl.cuh @@ -15,12 +15,12 @@ */ #pragma once +#include #include #include #include #include #include -#include #include #include diff --git a/cpp/src/prims/per_v_transform_reduce_dst_key_aggregated_outgoing_e.cuh b/cpp/src/prims/per_v_transform_reduce_dst_key_aggregated_outgoing_e.cuh index cfcc03b2dd9..1bdb18f97a1 100644 --- a/cpp/src/prims/per_v_transform_reduce_dst_key_aggregated_outgoing_e.cuh +++ b/cpp/src/prims/per_v_transform_reduce_dst_key_aggregated_outgoing_e.cuh @@ -15,8 +15,8 @@ */ #pragma once -#include #include +#include #include #include diff --git a/cpp/src/prims/transform_reduce_dst_nbr_intersection_of_e_endpoints_by_v.cuh b/cpp/src/prims/transform_reduce_dst_nbr_intersection_of_e_endpoints_by_v.cuh index aa575ad1b5c..8746b849fbd 100644 --- a/cpp/src/prims/transform_reduce_dst_nbr_intersection_of_e_endpoints_by_v.cuh +++ b/cpp/src/prims/transform_reduce_dst_nbr_intersection_of_e_endpoints_by_v.cuh @@ -15,10 +15,10 @@ */ #pragma once +#include #include #include #include -#include #include #include diff --git a/cpp/src/prims/transform_reduce_e_by_src_dst_key.cuh b/cpp/src/prims/transform_reduce_e_by_src_dst_key.cuh index f736445b07b..b099bc07cc8 100644 --- a/cpp/src/prims/transform_reduce_e_by_src_dst_key.cuh +++ b/cpp/src/prims/transform_reduce_e_by_src_dst_key.cuh @@ -15,8 +15,8 @@ */ #pragma once -#include #include +#include #include #include diff --git a/cpp/src/structure/coarsen_graph_impl.cuh b/cpp/src/structure/coarsen_graph_impl.cuh index 0fb06c977cd..a8579d7c909 100644 --- a/cpp/src/structure/coarsen_graph_impl.cuh +++ b/cpp/src/structure/coarsen_graph_impl.cuh @@ -15,9 +15,9 @@ */ #pragma once +#include #include #include -#include #include #include diff --git a/cpp/src/structure/graph_view_impl.cuh b/cpp/src/structure/graph_view_impl.cuh index 0dad752157a..fcb58a77ec2 100644 --- a/cpp/src/structure/graph_view_impl.cuh +++ b/cpp/src/structure/graph_view_impl.cuh @@ -16,10 +16,10 @@ #pragma once +#include #include #include #include -#include #include #include diff --git a/cpp/src/structure/renumber_utils_impl.cuh b/cpp/src/structure/renumber_utils_impl.cuh index 922c0cdfb96..cd3096b44f7 100644 --- a/cpp/src/structure/renumber_utils_impl.cuh +++ b/cpp/src/structure/renumber_utils_impl.cuh @@ -15,8 +15,8 @@ */ #pragma once -#include #include +#include #include #include diff --git a/cpp/src/traversal/extract_bfs_paths_impl.cuh b/cpp/src/traversal/extract_bfs_paths_impl.cuh index 1e5b36bf212..d6d3d2f1400 100644 --- a/cpp/src/traversal/extract_bfs_paths_impl.cuh +++ b/cpp/src/traversal/extract_bfs_paths_impl.cuh @@ -15,9 +15,9 @@ */ #pragma once -#include -#include #include +#include +#include #include #include From a106866bb93487cfe3bdef7b47b16b0565552de9 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Mon, 11 Jul 2022 18:17:25 -0700 Subject: [PATCH 29/90] update cmake, exclude cugraph/internals from the build only for now --- python/cugraph/CMakeLists.txt | 2 +- python/pylibcugraph/pylibcugraph/CMakeLists.txt | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/python/cugraph/CMakeLists.txt b/python/cugraph/CMakeLists.txt index d49a29a4385..415111e8846 100644 --- a/python/cugraph/CMakeLists.txt +++ b/python/cugraph/CMakeLists.txt @@ -89,7 +89,7 @@ add_subdirectory(cugraph/dask/components) add_subdirectory(cugraph/dask/link_analysis) add_subdirectory(cugraph/dask/structure) add_subdirectory(cugraph/generators) -add_subdirectory(cugraph/internals) +#add_subdirectory(cugraph/internals) add_subdirectory(cugraph/layout) add_subdirectory(cugraph/linear_assignment) add_subdirectory(cugraph/link_analysis) diff --git a/python/pylibcugraph/pylibcugraph/CMakeLists.txt b/python/pylibcugraph/pylibcugraph/CMakeLists.txt index e21d06033d6..2a8925b6419 100644 --- a/python/pylibcugraph/pylibcugraph/CMakeLists.txt +++ b/python/pylibcugraph/pylibcugraph/CMakeLists.txt @@ -27,15 +27,21 @@ set(cython_sources uniform_neighbor_sample.pyx utils.pyx ) -set(linked_libraries cugraph::cugraph) -set(linked_libraries_c cugraph_c) +set(linked_libraries cugraph::cugraph;cugraph_c) + +#set(linked_libraries cugraph::cugraph) +#set(linked_libraries_c cugraph_c) +#LINKED_LIBRARIES ${linked_libraries} ${linked_libraries_c} + +#set(linked_libraries_c cugraph_c) #set(linked_libraries "/jnke/scikit-build-pr/cugraph/cpp") #message(STATUS "linked library is ${linked_libraries}") +#${linked_libraries_c} rapids_cython_create_modules( CXX SOURCE_FILES "${cython_sources}" - LINKED_LIBRARIES ${linked_libraries} ${linked_libraries_c} + LINKED_LIBRARIES ${linked_libraries} ) # TODO: Finding NumPy requires finding Development as well. Once this is fixed in CMake (no date @@ -47,6 +53,7 @@ foreach(target IN LISTS targets_using_numpy) endforeach() foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + message(STATUS "cython module is ${cython_module}") set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() From 65d767c701afdbd328f5157fda394fba703bb045 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 12 Jul 2022 14:11:15 -0700 Subject: [PATCH 30/90] add cugraph/internals to the CMakeLists, build cugraph and pylibcugraph along with libcugraph --- build.sh | 4 ++-- python/cugraph/CMakeLists.txt | 4 ++-- python/cugraph/cugraph/internals/CMakeLists.txt | 11 +++++++++++ python/pylibcugraph/CMakeLists.txt | 6 +++--- python/pylibcugraph/pylibcugraph/CMakeLists.txt | 3 ++- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/build.sh b/build.sh index 319c12675ee..72feb5b1e51 100755 --- a/build.sh +++ b/build.sh @@ -233,7 +233,7 @@ if buildAll || hasArg pylibcugraph; then # build. If not set by the user, set it to LIBCUGRAPH_BUILD_DIR CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH:=${LIBCUGRAPH_BUILD_DIR}} python setup.py build_ext --inplace --library-dir=${LIBCUGRAPH_BUILD_DIR} \ - -- -DFIND_CUGRAPH_CPP=ON \ + -- -DFIND_CUGRAPH_CPP=OFF \ -Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} -- -j${PARALLEL_LEVEL:-1} if [[ ${INSTALL_TARGET} != "" ]]; then env CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH} python setup.py install @@ -248,7 +248,7 @@ if buildAll || hasArg cugraph; then # build. If not set by the user, set it to LIBCUGRAPH_BUILD_DIR CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH:=${LIBCUGRAPH_BUILD_DIR}} python setup.py build_ext --inplace --library-dir=${LIBCUGRAPH_BUILD_DIR} \ - -- -DFIND_CUGRAPH_CPP=ON \ + -- -DFIND_CUGRAPH_CPP=OFF \ -Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} -- -j${PARALLEL_LEVEL:-1} if [[ ${INSTALL_TARGET} != "" ]]; then env CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH} python setup.py install diff --git a/python/cugraph/CMakeLists.txt b/python/cugraph/CMakeLists.txt index 415111e8846..c2d21fe0727 100644 --- a/python/cugraph/CMakeLists.txt +++ b/python/cugraph/CMakeLists.txt @@ -50,7 +50,7 @@ if(NOT cugraph_FOUND) # TODO: This will not be necessary once we upgrade to CMake 3.22, which will pull in the required # languages for the C++ project even if this project does not require those languges. include(rapids-cuda) - rapids_cuda_init_architectures(cugraph-python) + rapids_cuda_init_architectures(CUGRAPH) enable_language(CUDA) # FIXME: check of this is necessary @@ -89,7 +89,7 @@ add_subdirectory(cugraph/dask/components) add_subdirectory(cugraph/dask/link_analysis) add_subdirectory(cugraph/dask/structure) add_subdirectory(cugraph/generators) -#add_subdirectory(cugraph/internals) +add_subdirectory(cugraph/internals) add_subdirectory(cugraph/layout) add_subdirectory(cugraph/linear_assignment) add_subdirectory(cugraph/link_analysis) diff --git a/python/cugraph/cugraph/internals/CMakeLists.txt b/python/cugraph/cugraph/internals/CMakeLists.txt index bfb8bc67aa4..24cbcd9ddd0 100644 --- a/python/cugraph/cugraph/internals/CMakeLists.txt +++ b/python/cugraph/cugraph/internals/CMakeLists.txt @@ -21,10 +21,21 @@ rapids_cython_create_modules( ) set(targets_using_numpy internals_internals) +set(targets_using_headers internals_internals) + +include_directories(${CMAKE_CURRENT_LIST_DIR}) + +# test code to be removed + +#target_include_directories(${targets_using_header} PRIVATE "/home/nfs/jnke/build-pr/cugraph/python/cugraph/cugraph/internals") + foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() +message(STATUS "rapids cython created targets ${RAPIDS_CYTHON_CREATED_TARGETS}") + foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + message(STATUS "cython module is ${cython_module}") set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() \ No newline at end of file diff --git a/python/pylibcugraph/CMakeLists.txt b/python/pylibcugraph/CMakeLists.txt index eca907946ff..cc2f0ef9f77 100644 --- a/python/pylibcugraph/CMakeLists.txt +++ b/python/pylibcugraph/CMakeLists.txt @@ -53,7 +53,7 @@ if(NOT cugraph_FOUND) # TODO: This will not be necessary once we upgrade to CMake 3.22, which will pull in the required # languages for the C++ project even if this project does not require those languges. include(rapids-cuda) - rapids_cuda_init_architectures(pylibcugraph-python) + rapids_cuda_init_architectures(CUGRAPH) enable_language(CUDA) # FIXME: check of this is necessary @@ -64,8 +64,8 @@ if(NOT cugraph_FOUND) # FIXME: are those parameter necessary? - set(BUILD_TESTS OFF) - set(BUILD_BENCHMARKS OFF) + #set(BUILD_TESTS OFF) + #set(BUILD_BENCHMARKS OFF) message(STATUS "installing packages") add_subdirectory(../../cpp cugraph-cpp) diff --git a/python/pylibcugraph/pylibcugraph/CMakeLists.txt b/python/pylibcugraph/pylibcugraph/CMakeLists.txt index 2a8925b6419..b51af8ed30d 100644 --- a/python/pylibcugraph/pylibcugraph/CMakeLists.txt +++ b/python/pylibcugraph/pylibcugraph/CMakeLists.txt @@ -11,7 +11,7 @@ # or implied. See the License for the specific language governing permissions and limitations under # the License. # ============================================================================= - +#include(cmake/thirdparty/get_libcudacxx.cmake) set(cython_sources bfs.pyx eigenvector_centrality.pyx @@ -52,6 +52,7 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() +#message(STATUS "origin is ${HOME}") foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) message(STATUS "cython module is ${cython_module}") set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") From 803551fc358f74088beb4a9f2f6e951b90b1d501 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Wed, 13 Jul 2022 12:05:54 -0700 Subject: [PATCH 31/90] skip libcugraph build if there is a prior installation --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 72feb5b1e51..319c12675ee 100755 --- a/build.sh +++ b/build.sh @@ -233,7 +233,7 @@ if buildAll || hasArg pylibcugraph; then # build. If not set by the user, set it to LIBCUGRAPH_BUILD_DIR CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH:=${LIBCUGRAPH_BUILD_DIR}} python setup.py build_ext --inplace --library-dir=${LIBCUGRAPH_BUILD_DIR} \ - -- -DFIND_CUGRAPH_CPP=OFF \ + -- -DFIND_CUGRAPH_CPP=ON \ -Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} -- -j${PARALLEL_LEVEL:-1} if [[ ${INSTALL_TARGET} != "" ]]; then env CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH} python setup.py install @@ -248,7 +248,7 @@ if buildAll || hasArg cugraph; then # build. If not set by the user, set it to LIBCUGRAPH_BUILD_DIR CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH:=${LIBCUGRAPH_BUILD_DIR}} python setup.py build_ext --inplace --library-dir=${LIBCUGRAPH_BUILD_DIR} \ - -- -DFIND_CUGRAPH_CPP=OFF \ + -- -DFIND_CUGRAPH_CPP=ON \ -Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} -- -j${PARALLEL_LEVEL:-1} if [[ ${INSTALL_TARGET} != "" ]]; then env CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH} python setup.py install From cad115d0d881a20c5e1020cd697092855270de80 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Wed, 13 Jul 2022 16:28:42 -0700 Subject: [PATCH 32/90] add debug print --- ci/cpu/build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index f638bf85add..c36d7f4b494 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -90,7 +90,10 @@ if [ "$BUILD_LIBCUGRAPH" == '1' ]; then else gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} --dirty --no-remove-work-dir conda/recipes/libcugraph mkdir -p ${CONDA_BLD_DIR}/libcugraph - mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/libcugraph/work + gpuci_logger "copying libcugraph instead of moving it" + cp ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/libcugraph/work + gpuci_logger "checking what is inside the dir work" + ls ${CONDA_BLD_DIR}/work fi gpuci_logger "sccache stats" sccache --show-stats From e84ae6adac1acc329fe3cb3f4bc7a458ed21a26d Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Wed, 13 Jul 2022 17:56:17 -0700 Subject: [PATCH 33/90] copy directories --- ci/cpu/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index c36d7f4b494..b0134bbeb9a 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -91,7 +91,7 @@ if [ "$BUILD_LIBCUGRAPH" == '1' ]; then gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} --dirty --no-remove-work-dir conda/recipes/libcugraph mkdir -p ${CONDA_BLD_DIR}/libcugraph gpuci_logger "copying libcugraph instead of moving it" - cp ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/libcugraph/work + cp -r ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/libcugraph/work gpuci_logger "checking what is inside the dir work" ls ${CONDA_BLD_DIR}/work fi From a7c847d0fa915799abbc153b1c951da9dbe605b8 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Wed, 13 Jul 2022 18:38:43 -0700 Subject: [PATCH 34/90] update cmakelist --- ci/cpu/build.sh | 5 +---- python/pylibcugraph/CMakeLists.txt | 4 ++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index b0134bbeb9a..f638bf85add 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -90,10 +90,7 @@ if [ "$BUILD_LIBCUGRAPH" == '1' ]; then else gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} --dirty --no-remove-work-dir conda/recipes/libcugraph mkdir -p ${CONDA_BLD_DIR}/libcugraph - gpuci_logger "copying libcugraph instead of moving it" - cp -r ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/libcugraph/work - gpuci_logger "checking what is inside the dir work" - ls ${CONDA_BLD_DIR}/work + mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/libcugraph/work fi gpuci_logger "sccache stats" sccache --show-stats diff --git a/python/pylibcugraph/CMakeLists.txt b/python/pylibcugraph/CMakeLists.txt index cc2f0ef9f77..d85e049a3f9 100644 --- a/python/pylibcugraph/CMakeLists.txt +++ b/python/pylibcugraph/CMakeLists.txt @@ -41,6 +41,10 @@ option(FIND_CUGRAPH_CPP "Search for existing CUGRAPH C++ installations before de if(FIND_CUGRAPH_CPP) message(STATUS "trying to find the package") + include(rapids-cuda) + rapids_cuda_init_architectures(CUGRAPH) + enable_language(CUDA) + include("${CMAKE_PROJECT_cugraph-python_INCLUDE}") find_package(cugraph ${cugraph_version} REQUIRED) #find_package(cugraph_c REQUIRED) else() From fe1e4a9078003d449fc56a0f3bb43708fb9cae4a Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Mon, 18 Jul 2022 10:50:47 -0700 Subject: [PATCH 35/90] add debug print --- ci/cpu/build.sh | 7 ++++++- python/pylibcugraph/CMakeLists.txt | 4 ---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index f638bf85add..f09e88a651b 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -90,7 +90,7 @@ if [ "$BUILD_LIBCUGRAPH" == '1' ]; then else gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} --dirty --no-remove-work-dir conda/recipes/libcugraph mkdir -p ${CONDA_BLD_DIR}/libcugraph - mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/libcugraph/work + # mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/libcugraph/work fi gpuci_logger "sccache stats" sccache --show-stats @@ -100,6 +100,11 @@ fi if [ "$BUILD_CUGRAPH" == "1" ]; then gpuci_logger "Building conda packages for pylibcugraph and cugraph" + + echo "checking cpp" + ls -l ${CONDA_BLD_DIR}/work/cpp + echo "checking build" + ls -l ${CONDA_BLD_DIR}/work/cpp/build if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/pylibcugraph --python=$PYTHON gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/cugraph --python=$PYTHON diff --git a/python/pylibcugraph/CMakeLists.txt b/python/pylibcugraph/CMakeLists.txt index d85e049a3f9..cc2f0ef9f77 100644 --- a/python/pylibcugraph/CMakeLists.txt +++ b/python/pylibcugraph/CMakeLists.txt @@ -41,10 +41,6 @@ option(FIND_CUGRAPH_CPP "Search for existing CUGRAPH C++ installations before de if(FIND_CUGRAPH_CPP) message(STATUS "trying to find the package") - include(rapids-cuda) - rapids_cuda_init_architectures(CUGRAPH) - enable_language(CUDA) - include("${CMAKE_PROJECT_cugraph-python_INCLUDE}") find_package(cugraph ${cugraph_version} REQUIRED) #find_package(cugraph_c REQUIRED) else() From 77b3a9808d00b57777fdda796381a7d7aadbb390 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Mon, 18 Jul 2022 13:20:57 -0700 Subject: [PATCH 36/90] add debug prints --- ci/cpu/build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index f09e88a651b..11724b9c2b8 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -85,6 +85,8 @@ gpuci_mamba_retry install -c conda-forge boa if [ "$BUILD_LIBCUGRAPH" == '1' ]; then gpuci_logger "Building conda package for libcugraph and libcugraph_etl" + echo "checking libcudacxx before building libcugraph" + ls -l /opt/conda/envs/rapids/lib/cmake if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcugraph else @@ -105,6 +107,8 @@ if [ "$BUILD_CUGRAPH" == "1" ]; then ls -l ${CONDA_BLD_DIR}/work/cpp echo "checking build" ls -l ${CONDA_BLD_DIR}/work/cpp/build + echo "checking libcudacxx before building pylibcugraph" + ls -l /opt/conda/envs/rapids/lib/cmake if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/pylibcugraph --python=$PYTHON gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/cugraph --python=$PYTHON From 08ce91a057565ac3c20bf2e6a59e88acb7257a7c Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Mon, 18 Jul 2022 13:39:41 -0700 Subject: [PATCH 37/90] debug --- ci/cpu/build.sh | 3 +++ conda/environments/cugraph_dev_cuda11.5.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index 11724b9c2b8..b1b76c51f22 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -44,6 +44,9 @@ gpuci_logger "Check environment variables" env gpuci_logger "Activate conda env" +echo "checking inside CONDA_BLD_DIR" +ls -l $CONDA_BLD_DIR +mamba env update -f $CONDA_BLD_DIR/work/conda/environments/cugraph_dev_cuda11.5.yml . /opt/conda/etc/profile.d/conda.sh conda activate rapids diff --git a/conda/environments/cugraph_dev_cuda11.5.yml b/conda/environments/cugraph_dev_cuda11.5.yml index 70abb931577..6625373539a 100644 --- a/conda/environments/cugraph_dev_cuda11.5.yml +++ b/conda/environments/cugraph_dev_cuda11.5.yml @@ -1,4 +1,4 @@ -name: cugraph_dev +name: rapids channels: - rapidsai - nvidia From 54927f685abdb37ac493267debce4feb51be6e32 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Mon, 18 Jul 2022 15:38:26 -0700 Subject: [PATCH 38/90] install libcudf --- ci/cpu/build.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index b1b76c51f22..3e0a8b3cd3f 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -44,11 +44,10 @@ gpuci_logger "Check environment variables" env gpuci_logger "Activate conda env" -echo "checking inside CONDA_BLD_DIR" -ls -l $CONDA_BLD_DIR -mamba env update -f $CONDA_BLD_DIR/work/conda/environments/cugraph_dev_cuda11.5.yml +echo "installing libcudf" . /opt/conda/etc/profile.d/conda.sh conda activate rapids +mamba install -y -c rapidsai -c nvidia -c rapidsai-nightly -c conda-forge libcudf=22.08.* # Remove rapidsai-nightly channel if we are building main branch if [ "$SOURCE_BRANCH" = "main" ]; then From ca62d26b10c7562a5821b89273f26fbc183ba958 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Mon, 18 Jul 2022 16:24:32 -0700 Subject: [PATCH 39/90] install cugraph_dev_cuda11.5 --- ci/cpu/build.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index 3e0a8b3cd3f..b7949fc84e5 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -20,6 +20,9 @@ export HOME=$WORKSPACE # Switch to project root; also root of repo checkout cd $WORKSPACE +echo "checking the workspace" +ls -l $WORKSPACE + # If nightly build, append current YYMMDD to version if [[ "$BUILD_MODE" = "branch" && "$SOURCE_BRANCH" = branch-* ]] ; then export VERSION_SUFFIX=`date +%y%m%d` @@ -47,7 +50,7 @@ gpuci_logger "Activate conda env" echo "installing libcudf" . /opt/conda/etc/profile.d/conda.sh conda activate rapids -mamba install -y -c rapidsai -c nvidia -c rapidsai-nightly -c conda-forge libcudf=22.08.* +# mamba install -y -c rapidsai -c nvidia -c rapidsai-nightly -c conda-forge libcudf=22.08.* # Remove rapidsai-nightly channel if we are building main branch if [ "$SOURCE_BRANCH" = "main" ]; then @@ -95,6 +98,9 @@ if [ "$BUILD_LIBCUGRAPH" == '1' ]; then gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} --dirty --no-remove-work-dir conda/recipes/libcugraph mkdir -p ${CONDA_BLD_DIR}/libcugraph # mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/libcugraph/work + echo "installing conda env after libcugraph" + conda env update -f ${CONDA_BLD_DIR}/work/conda/environments/cugraph_dev_cuda11.5.yml + fi gpuci_logger "sccache stats" sccache --show-stats From 7f59de9c270f528712040e27cd256a93557745c7 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Mon, 18 Jul 2022 16:26:01 -0700 Subject: [PATCH 40/90] update conda env --- ci/cpu/build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index b7949fc84e5..a6bd25a29c8 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -99,7 +99,9 @@ if [ "$BUILD_LIBCUGRAPH" == '1' ]; then mkdir -p ${CONDA_BLD_DIR}/libcugraph # mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/libcugraph/work echo "installing conda env after libcugraph" - conda env update -f ${CONDA_BLD_DIR}/work/conda/environments/cugraph_dev_cuda11.5.yml + conda deactivate rapids + mamba env update -f ${CONDA_BLD_DIR}/work/conda/environments/cugraph_dev_cuda11.5.yml + conda activate rapids fi gpuci_logger "sccache stats" From 10f82b14991f1e9521256ccce35db7cc42cab7e0 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Mon, 18 Jul 2022 16:56:32 -0700 Subject: [PATCH 41/90] set always yes --- ci/cpu/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index a6bd25a29c8..f76f917c087 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -99,6 +99,7 @@ if [ "$BUILD_LIBCUGRAPH" == '1' ]; then mkdir -p ${CONDA_BLD_DIR}/libcugraph # mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/libcugraph/work echo "installing conda env after libcugraph" + conda config --env --set always_yes true conda deactivate rapids mamba env update -f ${CONDA_BLD_DIR}/work/conda/environments/cugraph_dev_cuda11.5.yml conda activate rapids From b4356880414eed86e8c57cc849f0ae49c92f04c6 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Mon, 18 Jul 2022 18:05:16 -0700 Subject: [PATCH 42/90] fix typo --- ci/cpu/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index f76f917c087..ffc1a884487 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -100,7 +100,7 @@ if [ "$BUILD_LIBCUGRAPH" == '1' ]; then # mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/libcugraph/work echo "installing conda env after libcugraph" conda config --env --set always_yes true - conda deactivate rapids + conda deactivate mamba env update -f ${CONDA_BLD_DIR}/work/conda/environments/cugraph_dev_cuda11.5.yml conda activate rapids From 049f07320e0a76e6bcc72789ed55c4cae61d1d6a Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Tue, 19 Jul 2022 16:26:44 -0700 Subject: [PATCH 43/90] Make cuco a private dependency. --- cpp/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 913aab7bd5a..bb2ed0b37b7 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -309,8 +309,8 @@ if (USE_CUGRAPH_OPS) PUBLIC cugraph-ops::cugraph-ops++ raft::raft - cuco::cuco PRIVATE + cuco::cuco cugraph::cuHornet NCCL::NCCL ) @@ -318,8 +318,8 @@ else() target_link_libraries(cugraph PUBLIC raft::raft - cuco::cuco PRIVATE + cuco::cuco cugraph::cuHornet NCCL::NCCL ) @@ -439,8 +439,8 @@ target_link_libraries(cugraph_c CUDA::cusolver CUDA::cusparse raft::raft - cuco::cuco PRIVATE + cuco::cuco cugraph::cugraph ) From 9b9c2eb4286c98b063e500f9d5bcac48ef2a1e3f Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Tue, 19 Jul 2022 16:29:06 -0700 Subject: [PATCH 44/90] Use rapids-cmake for downloading cuco. --- cpp/CMakeLists.txt | 3 ++- cpp/cmake/thirdparty/get_cuco.cmake | 34 ----------------------------- 2 files changed, 2 insertions(+), 35 deletions(-) delete mode 100644 cpp/cmake/thirdparty/get_cuco.cmake diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index bb2ed0b37b7..d1286e48880 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -153,7 +153,8 @@ rapids_cpm_init() # Putting this before raft to override RAFT from pulling them in. include(cmake/thirdparty/get_libcudacxx.cmake) -include(cmake/thirdparty/get_cuco.cmake) +include(${rapids-cmake-dir}/cpm/cuco.cmake) +rapids_cpm_cuco(BUILD_EXPORT_SET cudf-exports) include(cmake/thirdparty/get_raft.cmake) diff --git a/cpp/cmake/thirdparty/get_cuco.cmake b/cpp/cmake/thirdparty/get_cuco.cmake deleted file mode 100644 index ac1eb993d35..00000000000 --- a/cpp/cmake/thirdparty/get_cuco.cmake +++ /dev/null @@ -1,34 +0,0 @@ -#============================================================================= -# Copyright (c) 2021-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. -#============================================================================= - -function(find_and_configure_cuco VERSION) - - rapids_cpm_find(cuco ${VERSION} - GLOBAL_TARGETS cuco::cuco - BUILD_EXPORT_SET cugraph-exports - CPM_ARGS - EXCLUDE_FROM_ALL TRUE - GIT_REPOSITORY https://github.com/NVIDIA/cuCollections.git - GIT_TAG 55029034c3f82bca36148c9be29941b37492394d - OPTIONS "BUILD_TESTS OFF" - "BUILD_BENCHMARKS OFF" - "BUILD_EXAMPLES OFF" - ) - -endfunction() - -# cuCollections doesn't have a version yet -find_and_configure_cuco(0.0) From dda86e48e5fa00720f07456e1b2790eb0e089df0 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 19 Jul 2022 16:48:31 -0700 Subject: [PATCH 45/90] clean repo, remove libcudacxx from INSTALL_EXPORT_SET --- ci/cpu/build.sh | 24 ++------------------- conda/environments/cugraph_dev_cuda11.5.yml | 2 +- cpp/cmake/thirdparty/get_libcudacxx.cmake | 3 +-- 3 files changed, 4 insertions(+), 25 deletions(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index ffc1a884487..ef32c181aaf 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -20,9 +20,6 @@ export HOME=$WORKSPACE # Switch to project root; also root of repo checkout cd $WORKSPACE -echo "checking the workspace" -ls -l $WORKSPACE - # If nightly build, append current YYMMDD to version if [[ "$BUILD_MODE" = "branch" && "$SOURCE_BRANCH" = branch-* ]] ; then export VERSION_SUFFIX=`date +%y%m%d` @@ -47,10 +44,8 @@ gpuci_logger "Check environment variables" env gpuci_logger "Activate conda env" -echo "installing libcudf" . /opt/conda/etc/profile.d/conda.sh conda activate rapids -# mamba install -y -c rapidsai -c nvidia -c rapidsai-nightly -c conda-forge libcudf=22.08.* # Remove rapidsai-nightly channel if we are building main branch if [ "$SOURCE_BRANCH" = "main" ]; then @@ -90,20 +85,12 @@ gpuci_mamba_retry install -c conda-forge boa if [ "$BUILD_LIBCUGRAPH" == '1' ]; then gpuci_logger "Building conda package for libcugraph and libcugraph_etl" - echo "checking libcudacxx before building libcugraph" - ls -l /opt/conda/envs/rapids/lib/cmake if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcugraph else gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} --dirty --no-remove-work-dir conda/recipes/libcugraph mkdir -p ${CONDA_BLD_DIR}/libcugraph - # mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/libcugraph/work - echo "installing conda env after libcugraph" - conda config --env --set always_yes true - conda deactivate - mamba env update -f ${CONDA_BLD_DIR}/work/conda/environments/cugraph_dev_cuda11.5.yml - conda activate rapids - + mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/libcugraph/work fi gpuci_logger "sccache stats" sccache --show-stats @@ -113,13 +100,6 @@ fi if [ "$BUILD_CUGRAPH" == "1" ]; then gpuci_logger "Building conda packages for pylibcugraph and cugraph" - - echo "checking cpp" - ls -l ${CONDA_BLD_DIR}/work/cpp - echo "checking build" - ls -l ${CONDA_BLD_DIR}/work/cpp/build - echo "checking libcudacxx before building pylibcugraph" - ls -l /opt/conda/envs/rapids/lib/cmake if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/pylibcugraph --python=$PYTHON gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/cugraph --python=$PYTHON @@ -138,4 +118,4 @@ fi ################################################################################ gpuci_logger "Upload conda packages" -source ci/cpu/upload.sh +source ci/cpu/upload.sh \ No newline at end of file diff --git a/conda/environments/cugraph_dev_cuda11.5.yml b/conda/environments/cugraph_dev_cuda11.5.yml index 6625373539a..70abb931577 100644 --- a/conda/environments/cugraph_dev_cuda11.5.yml +++ b/conda/environments/cugraph_dev_cuda11.5.yml @@ -1,4 +1,4 @@ -name: rapids +name: cugraph_dev channels: - rapidsai - nvidia diff --git a/cpp/cmake/thirdparty/get_libcudacxx.cmake b/cpp/cmake/thirdparty/get_libcudacxx.cmake index 41e5998a448..1c51c5a84a9 100644 --- a/cpp/cmake/thirdparty/get_libcudacxx.cmake +++ b/cpp/cmake/thirdparty/get_libcudacxx.cmake @@ -16,8 +16,7 @@ function(find_and_configure_libcudacxx) include(${rapids-cmake-dir}/cpm/libcudacxx.cmake) - rapids_cpm_libcudacxx(BUILD_EXPORT_SET cugraph-exports - INSTALL_EXPORT_SET cugraph-exports) + rapids_cpm_libcudacxx(BUILD_EXPORT_SET cugraph-exports) endfunction() From 4e08e7b1911cc616a39eca888f96bf48fca8f803 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Tue, 19 Jul 2022 17:02:15 -0700 Subject: [PATCH 46/90] Update cpp/CMakeLists.txt --- cpp/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index d1286e48880..64a016a0d9c 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -154,7 +154,7 @@ rapids_cpm_init() # Putting this before raft to override RAFT from pulling them in. include(cmake/thirdparty/get_libcudacxx.cmake) include(${rapids-cmake-dir}/cpm/cuco.cmake) -rapids_cpm_cuco(BUILD_EXPORT_SET cudf-exports) +rapids_cpm_cuco(BUILD_EXPORT_SET cugraph-exports) include(cmake/thirdparty/get_raft.cmake) From 89f90e22d8466fb79975097884f38ecfca0e48d2 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 19 Jul 2022 17:52:02 -0700 Subject: [PATCH 47/90] disabling the cpp tests temporarily --- build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 319c12675ee..b15038c1c08 100755 --- a/build.sh +++ b/build.sh @@ -54,7 +54,8 @@ VERBOSE_FLAG="" CMAKE_VERBOSE_OPTION="" BUILD_TYPE=Release INSTALL_TARGET="--target install" -BUILD_CPP_TESTS=ON +# FIXME: Disabling the cpp tests for now since they require cuco +BUILD_CPP_TESTS=OFF BUILD_CPP_MG_TESTS=OFF BUILD_ALL_GPU_ARCH=0 From 65a0a9bcb10f6aee52ae2c3dc0b6bc75638e5c60 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 19 Jul 2022 19:14:51 -0700 Subject: [PATCH 48/90] add core_number to cmake --- python/pylibcugraph/pylibcugraph/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/python/pylibcugraph/pylibcugraph/CMakeLists.txt b/python/pylibcugraph/pylibcugraph/CMakeLists.txt index b51af8ed30d..402a898be3a 100644 --- a/python/pylibcugraph/pylibcugraph/CMakeLists.txt +++ b/python/pylibcugraph/pylibcugraph/CMakeLists.txt @@ -14,6 +14,7 @@ #include(cmake/thirdparty/get_libcudacxx.cmake) set(cython_sources bfs.pyx + core_number.pyx eigenvector_centrality.pyx graph_properties.pyx graphs.pyx From f48955a68c1464d86e506d178390170d658436f5 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 21 Jul 2022 14:14:22 -0700 Subject: [PATCH 49/90] Explicitly add private links to cuco for tests that need it due to accessing libcugraph internals. --- cpp/tests/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index 80fb2580c03..a358f9f25c5 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -43,6 +43,8 @@ target_link_libraries(cugraphtestutil PUBLIC cugraph::cugraph NCCL::NCCL + PRIVATE + cuco::cuco ) @@ -462,6 +464,7 @@ ConfigureTest(RANDOM_WALKS_LOW_LEVEL_TEST sampling/rw_low_level_test.cu) ########################################################################################### # - MG NBR SAMPLING tests ----------------------------------------------------------------- ConfigureTest(UNIFORM_NEIGHBOR_SAMPLING_TEST sampling/sg_uniform_neighbor_sampling.cu) +target_link_libraries(UNIFORM_NEIGHBOR_SAMPLING_TEST PRIVATE cuco::cuco) ################################################################################################### # FIXME: since this is technically not a test, consider refactoring the the From f08929b779a07c9026ecd72e17ad68e54339f7df Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 21 Jul 2022 14:15:26 -0700 Subject: [PATCH 50/90] Fix typo. --- cpp/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index d1286e48880..64a016a0d9c 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -154,7 +154,7 @@ rapids_cpm_init() # Putting this before raft to override RAFT from pulling them in. include(cmake/thirdparty/get_libcudacxx.cmake) include(${rapids-cmake-dir}/cpm/cuco.cmake) -rapids_cpm_cuco(BUILD_EXPORT_SET cudf-exports) +rapids_cpm_cuco(BUILD_EXPORT_SET cugraph-exports) include(cmake/thirdparty/get_raft.cmake) From f423ab0f0f577aeffa9da993ad847796f71ec3f3 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 22 Jul 2022 08:58:11 -0700 Subject: [PATCH 51/90] Add one more test. --- cpp/tests/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index a358f9f25c5..7bc3fa527fb 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -579,6 +579,7 @@ if(BUILD_CUGRAPH_MG_TESTS) ########################################################################################### # - MG PRIMS COUNT_IF_V tests ------------------------------------------------------------- ConfigureTestMG(MG_COUNT_IF_V_TEST prims/mg_count_if_v.cu) + target_link_libraries(MG_COUNT_IF_V_TEST PRIVATE cuco::cuco) ########################################################################################### # - MG PRIMS TRANSFORM_REDUCE_V_FRONTIER_OUTGOING_E_BY_DST tests -------------------------- From 23421e600f5cd6039f546e3081618c2e80392965 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 22 Jul 2022 09:01:58 -0700 Subject: [PATCH 52/90] Add more tests. --- cpp/tests/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index 7bc3fa527fb..dfc9aecd677 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -585,22 +585,27 @@ if(BUILD_CUGRAPH_MG_TESTS) # - MG PRIMS TRANSFORM_REDUCE_V_FRONTIER_OUTGOING_E_BY_DST tests -------------------------- ConfigureTestMG(MG_TRANSFORM_REDUCE_V_FRONTIER_OUTGOING_E_BY_DST_TEST prims/mg_transform_reduce_v_frontier_outgoing_e_by_dst.cu) + target_link_libraries(MG_TRANSFORM_REDUCE_V_FRONTIER_OUTGOING_E_BY_DST_TEST PRIVATE cuco::cuco) ########################################################################################### # - MG PRIMS REDUCE_V tests --------------------------------------------------------------- ConfigureTestMG(MG_REDUCE_V_TEST prims/mg_reduce_v.cu) + target_link_libraries(MG_COUNT_IF_V_TEST PRIVATE cuco::cuco) ########################################################################################### # - MG PRIMS TRANSFORM_REDUCE_V tests ----------------------------------------------------- ConfigureTestMG(MG_TRANSFORM_REDUCE_V_TEST prims/mg_transform_reduce_v.cu) + target_link_libraries(MG_TRANSFORM_REDUCE_V_TEST PRIVATE cuco::cuco) ########################################################################################### # - MG PRIMS TRANSFORM_REDUCE_E tests ----------------------------------------------------- ConfigureTestMG(MG_TRANSFORM_REDUCE_E_TEST prims/mg_transform_reduce_e.cu) + target_link_libraries(MG_TRANSFORM_REDUCE_E_TEST PRIVATE cuco::cuco) ########################################################################################### # - MG PRIMS COUNT_IF_E tests ------------------------------------------------------------- ConfigureTestMG(MG_COUNT_IF_E_TEST prims/mg_count_if_e.cu) + target_link_libraries(MG_COUNT_IF_E_TEST PRIVATE cuco::cuco) ########################################################################################### # - MG PRIMS PER_V_TRANSFORM_REDUCE_INCOMING_OUTGOING_E tests ----------------------------- @@ -610,6 +615,7 @@ if(BUILD_CUGRAPH_MG_TESTS) ########################################################################################### # - MG PRIMS EXTRACT_IF_E tests ----------------------------------------------------------- ConfigureTestMG(MG_EXTRACT_IF_E_TEST prims/mg_extract_if_e.cu) + target_link_libraries(MG_EXTRACT_IF_E_TEST PRIVATE cuco::cuco) ########################################################################################### # - MG GATHER_UTILS tests ----------------------------------------------------------------- From b02e046c1418de3b91154fb8d83053daf81ad69d Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 22 Jul 2022 10:20:53 -0700 Subject: [PATCH 53/90] Fix typo. --- cpp/tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index dfc9aecd677..a4d0e83f8c2 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -590,7 +590,7 @@ if(BUILD_CUGRAPH_MG_TESTS) ########################################################################################### # - MG PRIMS REDUCE_V tests --------------------------------------------------------------- ConfigureTestMG(MG_REDUCE_V_TEST prims/mg_reduce_v.cu) - target_link_libraries(MG_COUNT_IF_V_TEST PRIVATE cuco::cuco) + target_link_libraries(MG_REDUCE_V_TEST PRIVATE cuco::cuco) ########################################################################################### # - MG PRIMS TRANSFORM_REDUCE_V tests ----------------------------------------------------- From 0f331fe6d528616e7cf32cda5bf10a697530baa1 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 22 Jul 2022 11:23:19 -0700 Subject: [PATCH 54/90] Add one more test. --- cpp/tests/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index a4d0e83f8c2..94359ec7202 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -611,6 +611,7 @@ if(BUILD_CUGRAPH_MG_TESTS) # - MG PRIMS PER_V_TRANSFORM_REDUCE_INCOMING_OUTGOING_E tests ----------------------------- ConfigureTestMG(MG_PER_V_TRANSFORM_REDUCE_INCOMING_OUTGOING_E_TEST prims/mg_per_v_transform_reduce_incoming_outgoing_e.cu) + target_link_libraries(MG_PER_V_TRANSFORM_REDUCE_INCOMING_OUTGOING_E_TEST PRIVATE cuco::cuco) ########################################################################################### # - MG PRIMS EXTRACT_IF_E tests ----------------------------------------------------------- From 3311493c75995123006464b649b44fac42642e1f Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 22 Jul 2022 12:39:25 -0700 Subject: [PATCH 55/90] Add a couple more tests. --- cpp/tests/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index 94359ec7202..0667c286279 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -621,14 +621,17 @@ if(BUILD_CUGRAPH_MG_TESTS) ########################################################################################### # - MG GATHER_UTILS tests ----------------------------------------------------------------- ConfigureTestMG(MG_GATHER_UTILS_TEST sampling/detail/mg_gather_utils.cu) + target_link_libraries(MG_GATHER_UTILS_TEST PRIVATE cuco::cuco) ########################################################################################### # - MG GATHER_ONE_HOP tests --------------------------------------------------------------- ConfigureTestMG(MG_GATHER_ONE_HOP_TEST sampling/detail/mg_gather_one_hop.cu) + target_link_libraries(MG_GATHER_ONE_HOP_TEST PRIVATE cuco::cuco) ########################################################################################### # - MG NBR SAMPLING tests ----------------------------------------------------------------- ConfigureTestMG(MG_UNIFORM_NEIGHBOR_SAMPLING_TEST sampling/mg_uniform_neighbor_sampling.cu) + target_link_libraries(MG_UNIFORM_NEIGHBOR_SAMPLING_TEST PRIVATE cuco::cuco) ########################################################################################### # - MG C API tests ------------------------------------------------------------------------ From 1e1c959cbf87162b7da1875f9e5f6f9a18d9087c Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Fri, 22 Jul 2022 15:03:16 -0700 Subject: [PATCH 56/90] update CMakeList and enable build of c++ tests --- build.sh | 2 +- python/cugraph/CMakeLists.txt | 16 ++-------- .../cugraph/cugraph/centrality/CMakeLists.txt | 19 ++++++------ .../cugraph/cugraph/community/CMakeLists.txt | 31 ++++++++++++++++--- .../cugraph/cugraph/components/CMakeLists.txt | 8 +++-- python/cugraph/cugraph/cores/CMakeLists.txt | 8 +++-- .../cugraph/dask/centrality/CMakeLists.txt | 8 +++-- .../cugraph/cugraph/dask/comms/CMakeLists.txt | 8 +++-- .../cugraph/dask/community/CMakeLists.txt | 8 +++-- .../cugraph/dask/components/CMakeLists.txt | 8 +++-- .../cugraph/dask/link_analysis/CMakeLists.txt | 8 +++-- .../cugraph/dask/structure/CMakeLists.txt | 8 +++-- .../cugraph/cugraph/generators/CMakeLists.txt | 8 +++-- .../cugraph/cugraph/internals/CMakeLists.txt | 16 +++------- python/cugraph/cugraph/layout/CMakeLists.txt | 8 +++-- .../cugraph/linear_assignment/CMakeLists.txt | 8 +++-- .../cugraph/link_analysis/CMakeLists.txt | 8 +++-- .../cugraph/link_prediction/CMakeLists.txt | 8 +++-- .../cugraph/cugraph/sampling/CMakeLists.txt | 8 +++-- .../cugraph/cugraph/structure/CMakeLists.txt | 8 +++-- python/cugraph/cugraph/tree/CMakeLists.txt | 8 +++-- .../cugraph/cugraph/utilities/CMakeLists.txt | 8 +++-- python/pylibcugraph/CMakeLists.txt | 16 +++------- .../pylibcugraph/pylibcugraph/CMakeLists.txt | 22 +++---------- .../pylibcugraph/utilities/api_tools.py | 5 ++- 25 files changed, 139 insertions(+), 124 deletions(-) diff --git a/build.sh b/build.sh index b15038c1c08..66509b8e5ea 100755 --- a/build.sh +++ b/build.sh @@ -55,7 +55,7 @@ CMAKE_VERBOSE_OPTION="" BUILD_TYPE=Release INSTALL_TARGET="--target install" # FIXME: Disabling the cpp tests for now since they require cuco -BUILD_CPP_TESTS=OFF +BUILD_CPP_TESTS=ON BUILD_CPP_MG_TESTS=OFF BUILD_ALL_GPU_ARCH=0 diff --git a/python/cugraph/CMakeLists.txt b/python/cugraph/CMakeLists.txt index c2d21fe0727..ec122f36e02 100644 --- a/python/cugraph/CMakeLists.txt +++ b/python/cugraph/CMakeLists.txt @@ -43,9 +43,6 @@ else() set(cugraph_FOUND OFF) endif() - -# FIXME: pylibcugraph should be installing libcugraph in its directory and cugraph should link -# to it if(NOT cugraph_FOUND) # TODO: This will not be necessary once we upgrade to CMake 3.22, which will pull in the required # languages for the C++ project even if this project does not require those languges. @@ -53,22 +50,15 @@ if(NOT cugraph_FOUND) rapids_cuda_init_architectures(CUGRAPH) enable_language(CUDA) - # FIXME: check of this is necessary # Since cugraph only enables CUDA optionally, we need to manually include the file that # rapids_cuda_init_architectures relies on `project` including. include("${CMAKE_PROJECT_cugraph-python_INCLUDE}") - # FIXME: are those parameter necessary? - - set(BUILD_TESTS OFF) - set(BUILD_BENCHMARKS OFF) - message(STATUS "installing packages") + + message(STATUS "installing CUGRAPH C++") add_subdirectory(../../cpp cugraph-cpp) - # Since there are multiple subpackages of cudf._lib that require access to libcudf, we place the - # library in the _lib/cpp directory as a single source of truth and modify the other rpaths - # appropriately. install(TARGETS cugraph DESTINATION cugraph/library) endif() @@ -76,8 +66,6 @@ endif() include(rapids-cython) rapids_cython_init() -# FIXME: Update build directory -# add_subdirectory(cugraph) add_subdirectory(cugraph/centrality) add_subdirectory(cugraph/community) add_subdirectory(cugraph/components) diff --git a/python/cugraph/cugraph/centrality/CMakeLists.txt b/python/cugraph/cugraph/centrality/CMakeLists.txt index 967f8e409c0..55cbf780cb4 100644 --- a/python/cugraph/cugraph/centrality/CMakeLists.txt +++ b/python/cugraph/cugraph/centrality/CMakeLists.txt @@ -12,26 +12,25 @@ # the License. # ============================================================================= -set(cython_sources betweenness_centrality_wrapper.pyx edge_betweenness_centrality_wrapper.pyx) +set(cython_sources + betweenness_centrality_wrapper.pyx + edge_betweenness_centrality_wrapper.pyx +) set(linked_libraries cugraph::cugraph) -#set(linked_libraries "/jnke/scikit-build-pr/cugraph/cpp") -#message(STATUS "linked library is ${linked_libraries}") rapids_cython_create_modules( CXX SOURCE_FILES "${cython_sources}" LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX centrality_ ) -#message(STATUS "linked library is ${linked_libraries}") set(targets_using_numpy centrality_betweenness_centrality_wrapper centrality_edge_betweenness_centrality_wrapper) foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -#message(STATUS "Done setting target") -message(STATUS "origin is ${LIBCUGRAPH_BUILD_DIR}") -foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") -endforeach() -#message(STATUS "Done adding path") \ No newline at end of file +if(NOT cugraph_FOUND) + foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") + endforeach() +endif() diff --git a/python/cugraph/cugraph/community/CMakeLists.txt b/python/cugraph/cugraph/community/CMakeLists.txt index 8071ee9f684..647a5cc47d9 100644 --- a/python/cugraph/cugraph/community/CMakeLists.txt +++ b/python/cugraph/cugraph/community/CMakeLists.txt @@ -12,7 +12,16 @@ # the License. # ============================================================================= -set(cython_sources ecg_wrapper.pyx egonet_wrapper.pyx ktruss_subgraph_wrapper.pyx leiden_wrapper.pyx louvain_wrapper.pyx spectral_clustering_wrapper.pyx subgraph_extraction_wrapper.pyx triangle_count_wrapper.pyx) +set(cython_sources + ecg_wrapper.pyx egonet_wrapper.pyx + ktruss_subgraph_wrapper.pyx + leiden_wrapper.pyx + louvain_wrapper.pyx + spectral_clustering_wrapper.pyx + subgraph_extraction_wrapper.pyx + triangle_count_wrapper.pyx +) + set(linked_libraries cugraph::cugraph) rapids_cython_create_modules( CXX @@ -20,11 +29,23 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX community_ ) -set(targets_using_numpy community_ecg_wrapper community_egonet_wrapper community_ktruss_subgraph_wrapper community_leiden_wrapper community_louvain_wrapper community_spectral_clustering_wrapper community_subgraph_extraction_wrapper community_triangle_count_wrapper) +set(targets_using_numpy + community_ecg_wrapper + community_egonet_wrapper + community_ktruss_subgraph_wrapper + community_leiden_wrapper + community_louvain_wrapper + community_spectral_clustering_wrapper + community_subgraph_extraction_wrapper + community_triangle_count_wrapper +) + foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") -endforeach() \ No newline at end of file +if(NOT cugraph_FOUND) + foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") + endforeach() +endif() diff --git a/python/cugraph/cugraph/components/CMakeLists.txt b/python/cugraph/cugraph/components/CMakeLists.txt index e24f35d114b..8382ed290b9 100644 --- a/python/cugraph/cugraph/components/CMakeLists.txt +++ b/python/cugraph/cugraph/components/CMakeLists.txt @@ -25,6 +25,8 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") -endforeach() \ No newline at end of file +if(NOT cugraph_FOUND) + foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") + endforeach() +endif() diff --git a/python/cugraph/cugraph/cores/CMakeLists.txt b/python/cugraph/cugraph/cores/CMakeLists.txt index 71c791780af..c09b8e456cc 100644 --- a/python/cugraph/cugraph/cores/CMakeLists.txt +++ b/python/cugraph/cugraph/cores/CMakeLists.txt @@ -25,6 +25,8 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") -endforeach() \ No newline at end of file +if(NOT cugraph_FOUND) + foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") + endforeach() +endif() diff --git a/python/cugraph/cugraph/dask/centrality/CMakeLists.txt b/python/cugraph/cugraph/dask/centrality/CMakeLists.txt index 86c01f84f2c..ab11b2912df 100644 --- a/python/cugraph/cugraph/dask/centrality/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/centrality/CMakeLists.txt @@ -25,6 +25,8 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") -endforeach() \ No newline at end of file +if(NOT cugraph_FOUND) + foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") + endforeach() +endif() diff --git a/python/cugraph/cugraph/dask/comms/CMakeLists.txt b/python/cugraph/cugraph/dask/comms/CMakeLists.txt index c7a56a9bf31..16fdfdd83b8 100644 --- a/python/cugraph/cugraph/dask/comms/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/comms/CMakeLists.txt @@ -25,6 +25,8 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") -endforeach() \ No newline at end of file +if(NOT cugraph_FOUND) + foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") + endforeach() +endif() diff --git a/python/cugraph/cugraph/dask/community/CMakeLists.txt b/python/cugraph/cugraph/dask/community/CMakeLists.txt index ed8ae91a5d7..8988843498a 100644 --- a/python/cugraph/cugraph/dask/community/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/community/CMakeLists.txt @@ -25,6 +25,8 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") -endforeach() \ No newline at end of file +if(NOT cugraph_FOUND) + foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") + endforeach() +endif() diff --git a/python/cugraph/cugraph/dask/components/CMakeLists.txt b/python/cugraph/cugraph/dask/components/CMakeLists.txt index 55923753b56..191be04c738 100644 --- a/python/cugraph/cugraph/dask/components/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/components/CMakeLists.txt @@ -25,6 +25,8 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") -endforeach() \ No newline at end of file +if(NOT cugraph_FOUND) + foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") + endforeach() +endif() diff --git a/python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt b/python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt index 287e11890e5..b60a4a2ab5c 100644 --- a/python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt @@ -25,6 +25,8 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") -endforeach() \ No newline at end of file +if(NOT cugraph_FOUND) + foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") + endforeach() +endif() diff --git a/python/cugraph/cugraph/dask/structure/CMakeLists.txt b/python/cugraph/cugraph/dask/structure/CMakeLists.txt index 2e1a8e0fe95..e8ead675432 100644 --- a/python/cugraph/cugraph/dask/structure/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/structure/CMakeLists.txt @@ -25,6 +25,8 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") -endforeach() \ No newline at end of file +if(NOT cugraph_FOUND) + foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") + endforeach() +endif() diff --git a/python/cugraph/cugraph/generators/CMakeLists.txt b/python/cugraph/cugraph/generators/CMakeLists.txt index 566da64d903..4c011a20b4f 100644 --- a/python/cugraph/cugraph/generators/CMakeLists.txt +++ b/python/cugraph/cugraph/generators/CMakeLists.txt @@ -25,6 +25,8 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") -endforeach() \ No newline at end of file +if(NOT cugraph_FOUND) + foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") + endforeach() +endif() diff --git a/python/cugraph/cugraph/internals/CMakeLists.txt b/python/cugraph/cugraph/internals/CMakeLists.txt index 24cbcd9ddd0..4795a0e023a 100644 --- a/python/cugraph/cugraph/internals/CMakeLists.txt +++ b/python/cugraph/cugraph/internals/CMakeLists.txt @@ -21,21 +21,15 @@ rapids_cython_create_modules( ) set(targets_using_numpy internals_internals) -set(targets_using_headers internals_internals) include_directories(${CMAKE_CURRENT_LIST_DIR}) -# test code to be removed - -#target_include_directories(${targets_using_header} PRIVATE "/home/nfs/jnke/build-pr/cugraph/python/cugraph/cugraph/internals") - foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -message(STATUS "rapids cython created targets ${RAPIDS_CYTHON_CREATED_TARGETS}") - -foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - message(STATUS "cython module is ${cython_module}") - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") -endforeach() \ No newline at end of file +if(NOT cugraph_FOUND) + foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") + endforeach() +endif() diff --git a/python/cugraph/cugraph/layout/CMakeLists.txt b/python/cugraph/cugraph/layout/CMakeLists.txt index a9ed1622678..3518c42afec 100644 --- a/python/cugraph/cugraph/layout/CMakeLists.txt +++ b/python/cugraph/cugraph/layout/CMakeLists.txt @@ -25,6 +25,8 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") -endforeach() \ No newline at end of file +if(NOT cugraph_FOUND) + foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") + endforeach() +endif() diff --git a/python/cugraph/cugraph/linear_assignment/CMakeLists.txt b/python/cugraph/cugraph/linear_assignment/CMakeLists.txt index b3b30fd2d33..08327d00cc8 100644 --- a/python/cugraph/cugraph/linear_assignment/CMakeLists.txt +++ b/python/cugraph/cugraph/linear_assignment/CMakeLists.txt @@ -25,6 +25,8 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") -endforeach() \ No newline at end of file +if(NOT cugraph_FOUND) + foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") + endforeach() +endif() diff --git a/python/cugraph/cugraph/link_analysis/CMakeLists.txt b/python/cugraph/cugraph/link_analysis/CMakeLists.txt index 53ae20964c7..4e1683d6196 100644 --- a/python/cugraph/cugraph/link_analysis/CMakeLists.txt +++ b/python/cugraph/cugraph/link_analysis/CMakeLists.txt @@ -25,6 +25,8 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") -endforeach() \ No newline at end of file +if(NOT cugraph_FOUND) + foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") + endforeach() +endif() diff --git a/python/cugraph/cugraph/link_prediction/CMakeLists.txt b/python/cugraph/cugraph/link_prediction/CMakeLists.txt index 6d7012c1d0b..ca625a929b1 100644 --- a/python/cugraph/cugraph/link_prediction/CMakeLists.txt +++ b/python/cugraph/cugraph/link_prediction/CMakeLists.txt @@ -25,6 +25,8 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") -endforeach() \ No newline at end of file +if(NOT cugraph_FOUND) + foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") + endforeach() +endif() diff --git a/python/cugraph/cugraph/sampling/CMakeLists.txt b/python/cugraph/cugraph/sampling/CMakeLists.txt index cf496444086..d29f010a2c2 100644 --- a/python/cugraph/cugraph/sampling/CMakeLists.txt +++ b/python/cugraph/cugraph/sampling/CMakeLists.txt @@ -25,6 +25,8 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") -endforeach() \ No newline at end of file +if(NOT cugraph_FOUND) + foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") + endforeach() +endif() diff --git a/python/cugraph/cugraph/structure/CMakeLists.txt b/python/cugraph/cugraph/structure/CMakeLists.txt index 76acad35fc0..c14ed0d8e0d 100644 --- a/python/cugraph/cugraph/structure/CMakeLists.txt +++ b/python/cugraph/cugraph/structure/CMakeLists.txt @@ -25,6 +25,8 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") -endforeach() \ No newline at end of file +if(NOT cugraph_FOUND) + foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") + endforeach() +endif() diff --git a/python/cugraph/cugraph/tree/CMakeLists.txt b/python/cugraph/cugraph/tree/CMakeLists.txt index ffc7366770e..7d86c41ec36 100644 --- a/python/cugraph/cugraph/tree/CMakeLists.txt +++ b/python/cugraph/cugraph/tree/CMakeLists.txt @@ -25,6 +25,8 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") -endforeach() \ No newline at end of file +if(NOT cugraph_FOUND) + foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") + endforeach() +endif() diff --git a/python/cugraph/cugraph/utilities/CMakeLists.txt b/python/cugraph/cugraph/utilities/CMakeLists.txt index 362b19d7945..fea41d15acc 100644 --- a/python/cugraph/cugraph/utilities/CMakeLists.txt +++ b/python/cugraph/cugraph/utilities/CMakeLists.txt @@ -25,6 +25,8 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") -endforeach() \ No newline at end of file +if(NOT cugraph_FOUND) + foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") + endforeach() +endif() diff --git a/python/pylibcugraph/CMakeLists.txt b/python/pylibcugraph/CMakeLists.txt index cc2f0ef9f77..b47a20ce8f5 100644 --- a/python/pylibcugraph/CMakeLists.txt +++ b/python/pylibcugraph/CMakeLists.txt @@ -35,20 +35,19 @@ project( option(FIND_CUGRAPH_CPP "Search for existing CUGRAPH C++ installations before defaulting to local files" OFF ) -# message(STATUS "looking for packages") # If the user requested it we attempt to find CUGRAPH. if(FIND_CUGRAPH_CPP) - message(STATUS "trying to find the package") + message(STATUS "Trying to find the package") find_package(cugraph ${cugraph_version} REQUIRED) - #find_package(cugraph_c REQUIRED) + else() set(cugraph_FOUND OFF) endif() message(STATUS "check if it was found ${cugraph_FOUND}") -# NOT cugraph_FOUND + if(NOT cugraph_FOUND) # TODO: This will not be necessary once we upgrade to CMake 3.22, which will pull in the required # languages for the C++ project even if this project does not require those languges. @@ -64,14 +63,9 @@ if(NOT cugraph_FOUND) # FIXME: are those parameter necessary? - #set(BUILD_TESTS OFF) - #set(BUILD_BENCHMARKS OFF) - message(STATUS "installing packages") + message(STATUS "installing CUGRAPH C++") add_subdirectory(../../cpp cugraph-cpp) - # Since there are multiple subpackages of cudf._lib that require access to libcudf, we place the - # library in the _lib/cpp directory as a single source of truth and modify the other rpaths - # appropriately. install(TARGETS cugraph DESTINATION pylibcugraph/library) endif() @@ -79,8 +73,6 @@ endif() include(rapids-cython) rapids_cython_init() -# FIXME: Update build directory -# add_subdirectory(cugraph) add_subdirectory(pylibcugraph) add_subdirectory(pylibcugraph/components) add_subdirectory(pylibcugraph/raft/common) diff --git a/python/pylibcugraph/pylibcugraph/CMakeLists.txt b/python/pylibcugraph/pylibcugraph/CMakeLists.txt index 402a898be3a..e73fa16f95e 100644 --- a/python/pylibcugraph/pylibcugraph/CMakeLists.txt +++ b/python/pylibcugraph/pylibcugraph/CMakeLists.txt @@ -11,7 +11,6 @@ # or implied. See the License for the specific language governing permissions and limitations under # the License. # ============================================================================= -#include(cmake/thirdparty/get_libcudacxx.cmake) set(cython_sources bfs.pyx core_number.pyx @@ -30,15 +29,6 @@ set(cython_sources ) set(linked_libraries cugraph::cugraph;cugraph_c) -#set(linked_libraries cugraph::cugraph) -#set(linked_libraries_c cugraph_c) -#LINKED_LIBRARIES ${linked_libraries} ${linked_libraries_c} - -#set(linked_libraries_c cugraph_c) -#set(linked_libraries "/jnke/scikit-build-pr/cugraph/cpp") -#message(STATUS "linked library is ${linked_libraries}") - -#${linked_libraries_c} rapids_cython_create_modules( CXX SOURCE_FILES "${cython_sources}" @@ -53,10 +43,8 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -#message(STATUS "origin is ${HOME}") -foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - message(STATUS "cython module is ${cython_module}") - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") -endforeach() - -#message(STATUS "Done adding path") \ No newline at end of file +if(NOT cugraph_FOUND) + foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/library") + endforeach() +endif() diff --git a/python/pylibcugraph/pylibcugraph/utilities/api_tools.py b/python/pylibcugraph/pylibcugraph/utilities/api_tools.py index b904359b99a..d676154241b 100644 --- a/python/pylibcugraph/pylibcugraph/utilities/api_tools.py +++ b/python/pylibcugraph/pylibcugraph/utilities/api_tools.py @@ -15,6 +15,7 @@ import warnings import inspect import types +import typing experimental_prefix = "EXPERIMENTAL" @@ -33,9 +34,7 @@ def experimental_warning_wrapper(obj): discovered and used. """ obj_type = type(obj) - # if obj_type not in [type, types.FunctionType, types.BuiltinFunctionType]: - if not isinstance( - obj_type, (type, types.FunctionType, types.BuiltinFunctionType)): + if not isinstance(obj, typing.Callable): raise TypeError("obj must be a class or a function type, got " f"{obj_type}") From 647bff56fb8af042523860090aae5d588a619295 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Fri, 22 Jul 2022 15:46:37 -0700 Subject: [PATCH 57/90] remove cython core number from python cugraph CMakeList --- python/cugraph/cugraph/cores/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cugraph/cugraph/cores/CMakeLists.txt b/python/cugraph/cugraph/cores/CMakeLists.txt index c09b8e456cc..e5d89dfdfcc 100644 --- a/python/cugraph/cugraph/cores/CMakeLists.txt +++ b/python/cugraph/cugraph/cores/CMakeLists.txt @@ -12,7 +12,7 @@ # the License. # ============================================================================= -set(cython_sources core_number_wrapper.pyx k_core_wrapper.pyx) +set(cython_sources k_core_wrapper.pyx) set(linked_libraries cugraph::cugraph) rapids_cython_create_modules( CXX From 8b31117c91e77098d7cba4e4a1fbf4b4cfd0bf09 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Fri, 22 Jul 2022 16:35:43 -0700 Subject: [PATCH 58/90] remove cython core_number from the list of targets using numpy --- python/cugraph/cugraph/cores/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cugraph/cugraph/cores/CMakeLists.txt b/python/cugraph/cugraph/cores/CMakeLists.txt index e5d89dfdfcc..7d2262227f9 100644 --- a/python/cugraph/cugraph/cores/CMakeLists.txt +++ b/python/cugraph/cugraph/cores/CMakeLists.txt @@ -20,7 +20,7 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX cores_ ) -set(targets_using_numpy cores_core_number_wrapper cores_k_core_wrapper) +set(targets_using_numpy cores_k_core_wrapper) foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() From 090e567474bfe3e6327157c28b619ba1b996e872 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 26 Jul 2022 16:20:29 -0700 Subject: [PATCH 59/90] update setup file, remove outdated docstrings --- python/cugraph/setup.py | 45 ++++++++---------------------------- python/pylibcugraph/setup.py | 36 ++--------------------------- 2 files changed, 11 insertions(+), 70 deletions(-) diff --git a/python/cugraph/setup.py b/python/cugraph/setup.py index df2dd91dbd0..cd9638510fd 100644 --- a/python/cugraph/setup.py +++ b/python/cugraph/setup.py @@ -18,36 +18,15 @@ from skbuild import setup from setuputils import get_environment_option -# from setuputils import get_cuda_version_from_header -# FIXME: Not necessary + from skbuild.command.build_ext import build_ext import versioneer INSTALL_REQUIRES = ['numba', 'cython'] -CYTHON_FILES = ['cugraph/**/*.pyx'] -UCX_HOME = get_environment_option("UCX_HOME") CUDA_HOME = get_environment_option('CUDA_HOME') -CONDA_PREFIX = get_environment_option('CONDA_PREFIX') - -# FIXME: No need to include the path to the conda dir -""" -conda_lib_dir = os.path.normpath(sys.prefix) + '/lib' -conda_include_dir = os.path.normpath(sys.prefix) + '/include' - -if CONDA_PREFIX: - conda_include_dir = CONDA_PREFIX + '/include' - conda_lib_dir = CONDA_PREFIX + '/lib' -""" - -if not UCX_HOME: - UCX_HOME = CONDA_PREFIX if CONDA_PREFIX else os.sys.prefix - -# FIXME: add ucx to INSTALL_REQUIRES -ucx_include_dir = os.path.join(UCX_HOME, "include") -ucx_lib_dir = os.path.join(UCX_HOME, "lib") if not CUDA_HOME: path_to_cuda_gdb = shutil.which("cuda-gdb") @@ -65,14 +44,6 @@ "Invalid CUDA_HOME: " "directory does not exist: {CUDA_HOME}" ) -cuda_include_dir = os.path.join(CUDA_HOME, "include") -# FIXME: This is causing a second version of cupy to be installed cupy-cuda115 -""" -INSTALL_REQUIRES.append( - "cupy-cuda" + get_cuda_version_from_header(cuda_include_dir) -) -""" - class CleanCommand(Command): """Custom clean command to tidy up the project root.""" @@ -100,8 +71,14 @@ def run(self): cmdclass.update(versioneer.get_cmdclass()) cmdclass["clean"] = CleanCommand cmdclass["build_ext"] = build_ext +PACKAGE_DATA = { + key: ["*.pxd"] for key in find_packages(include=["cugraph*"])} + +PACKAGE_DATA['cugraph'].extend( + ['cugraph/experimental/datasets/metadata/*.yaml', + 'cugraph/experimental/datasets/*.yaml']) + -# FIXME: remove setup_requires, the .toml file does it setup(name='cugraph', description="cuGraph - RAPIDS GPU Graph Analytics", version=versioneer.get_version(), @@ -117,11 +94,7 @@ def run(self): author="NVIDIA Corporation", setup_requires=['Cython>=0.29,<0.30'], packages=find_packages(include=['cugraph', 'cugraph.*']), - include_package_data=True, - package_data={ - '': ['python/cugraph/cugraph/experimental/datasets/metadata/*.yaml', - 'python/cugraph/cugraph/experimental/datasets/*.yaml'], - }, + package_data=PACKAGE_DATA, install_requires=INSTALL_REQUIRES, license="Apache", cmdclass=cmdclass, diff --git a/python/pylibcugraph/setup.py b/python/pylibcugraph/setup.py index 78343c03fd0..8a804055533 100644 --- a/python/pylibcugraph/setup.py +++ b/python/pylibcugraph/setup.py @@ -16,39 +16,14 @@ from setuptools import find_packages, Command from skbuild import setup -# FIXME: Not necessary + from skbuild.command.build_ext import build_ext from setuputils import get_environment_option -# from setuputils import get_cuda_version_from_header import versioneer -# INSTALL_REQUIRES = [] -# CYTHON_FILES = ['pylibcugraph/**/*.pyx'] - -UCX_HOME = get_environment_option("UCX_HOME") CUDA_HOME = get_environment_option('CUDA_HOME') -CONDA_PREFIX = get_environment_option('CONDA_PREFIX') - -# FIXME: No need to include the path to the conda dir -""" -conda_lib_dir = os.path.normpath(sys.prefix) + '/lib' -conda_include_dir = os.path.normpath(sys.prefix) + '/include' - -if CONDA_PREFIX: - conda_include_dir = CONDA_PREFIX + '/include' - conda_lib_dir = CONDA_PREFIX + '/lib' -""" - -if not UCX_HOME: - UCX_HOME = CONDA_PREFIX if CONDA_PREFIX else os.sys.prefix - - -# FIXME: create a list of packages required INSTALL_REQUIRES -# FIXME: add ucx to INSTALL_REQUIRES -ucx_include_dir = os.path.join(UCX_HOME, "include") -ucx_lib_dir = os.path.join(UCX_HOME, "lib") if not CUDA_HOME: path_to_cuda_gdb = shutil.which("cuda-gdb") @@ -66,14 +41,6 @@ "Invalid CUDA_HOME: " "directory does not exist: {CUDA_HOME}" ) -cuda_include_dir = os.path.join(CUDA_HOME, "include") -# FIXME: This is causing a second version of cupy to be installed cupy-cuda115 -""" -INSTALL_REQUIRES.append( - "cupy-cuda" + get_cuda_version_from_header(cuda_include_dir) -) -""" - class CleanCommand(Command): """Custom clean command to tidy up the project root.""" @@ -95,6 +62,7 @@ def run(self): os.system('rm -rf *.egg-info') os.system('find . -name "*.cpp" -type f -delete') os.system('find . -name "*.cpython*.so" -type f -delete') + os.system('rm -rf _skbuild') cmdclass = dict() From 96e4bb71dedb2adc79aaa3b02879cd71edb8cb24 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 26 Jul 2022 16:22:01 -0700 Subject: [PATCH 60/90] remove cmake setuptools from all environments --- conda/environments/cugraph_dev_cuda11.2.yml | 1 - conda/environments/cugraph_dev_cuda11.4.yml | 1 - conda/environments/cugraph_dev_cuda11.5.yml | 1 - 3 files changed, 3 deletions(-) diff --git a/conda/environments/cugraph_dev_cuda11.2.yml b/conda/environments/cugraph_dev_cuda11.2.yml index fab3e3f335c..f1f4c0e4570 100644 --- a/conda/environments/cugraph_dev_cuda11.2.yml +++ b/conda/environments/cugraph_dev_cuda11.2.yml @@ -28,7 +28,6 @@ dependencies: - clang=11.1.0 - clang-tools=11.1.0 - cmake>=3.20.1,!=3.23.0 -- cmake_setuptools>=0.1.3 - scikit-build>=0.13.1 - python>=3.8,<3.10 - notebook>=0.5.0 diff --git a/conda/environments/cugraph_dev_cuda11.4.yml b/conda/environments/cugraph_dev_cuda11.4.yml index 663da970983..fc1ca620e6d 100644 --- a/conda/environments/cugraph_dev_cuda11.4.yml +++ b/conda/environments/cugraph_dev_cuda11.4.yml @@ -28,7 +28,6 @@ dependencies: - clang=11.1.0 - clang-tools=11.1.0 - cmake>=3.20.1,!=3.23.0 -- cmake_setuptools>=0.1.3 - scikit-build>=0.13.1 - python>=3.8,<3.10 - notebook>=0.5.0 diff --git a/conda/environments/cugraph_dev_cuda11.5.yml b/conda/environments/cugraph_dev_cuda11.5.yml index 70abb931577..1c901e712cd 100644 --- a/conda/environments/cugraph_dev_cuda11.5.yml +++ b/conda/environments/cugraph_dev_cuda11.5.yml @@ -28,7 +28,6 @@ dependencies: - clang=11.1.0 - clang-tools=11.1.0 - cmake>=3.20.1,!=3.23.0 -- cmake_setuptools>=0.1.3 - scikit-build>=0.13.1 - python>=3.8,<3.10 - notebook>=0.5.0 From b7310f357b5190e6aebee42f2d2906490ec7963b Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 26 Jul 2022 16:24:19 -0700 Subject: [PATCH 61/90] remove outdate docstrings and unused env variables --- build.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/build.sh b/build.sh index 66509b8e5ea..79dd0f91dce 100755 --- a/build.sh +++ b/build.sh @@ -54,7 +54,6 @@ VERBOSE_FLAG="" CMAKE_VERBOSE_OPTION="" BUILD_TYPE=Release INSTALL_TARGET="--target install" -# FIXME: Disabling the cpp tests for now since they require cuco BUILD_CPP_TESTS=ON BUILD_CPP_MG_TESTS=OFF BUILD_ALL_GPU_ARCH=0 @@ -233,8 +232,7 @@ if buildAll || hasArg pylibcugraph; then # setup.py references an env var CUGRAPH_BUILD_PATH to find the libcugraph # build. If not set by the user, set it to LIBCUGRAPH_BUILD_DIR CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH:=${LIBCUGRAPH_BUILD_DIR}} - python setup.py build_ext --inplace --library-dir=${LIBCUGRAPH_BUILD_DIR} \ - -- -DFIND_CUGRAPH_CPP=ON \ + python setup.py build_ext --inplace -- -DFIND_CUGRAPH_CPP=ON \ -Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} -- -j${PARALLEL_LEVEL:-1} if [[ ${INSTALL_TARGET} != "" ]]; then env CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH} python setup.py install @@ -248,8 +246,7 @@ if buildAll || hasArg cugraph; then # setup.py references an env var CUGRAPH_BUILD_PATH to find the libcugraph # build. If not set by the user, set it to LIBCUGRAPH_BUILD_DIR CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH:=${LIBCUGRAPH_BUILD_DIR}} - python setup.py build_ext --inplace --library-dir=${LIBCUGRAPH_BUILD_DIR} \ - -- -DFIND_CUGRAPH_CPP=ON \ + python setup.py build_ext --inplace -- -DFIND_CUGRAPH_CPP=ON \ -Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} -- -j${PARALLEL_LEVEL:-1} if [[ ${INSTALL_TARGET} != "" ]]; then env CUGRAPH_BUILD_PATH=${CUGRAPH_BUILD_PATH} python setup.py install From 7a14588cb94fc04f51d0ccebc357cb1fc9149037 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 26 Jul 2022 16:26:10 -0700 Subject: [PATCH 62/90] add header file as a target based property --- python/cugraph/cugraph/internals/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/cugraph/cugraph/internals/CMakeLists.txt b/python/cugraph/cugraph/internals/CMakeLists.txt index 4795a0e023a..b0d858c3c24 100644 --- a/python/cugraph/cugraph/internals/CMakeLists.txt +++ b/python/cugraph/cugraph/internals/CMakeLists.txt @@ -22,7 +22,9 @@ rapids_cython_create_modules( set(targets_using_numpy internals_internals) -include_directories(${CMAKE_CURRENT_LIST_DIR}) +set(targets_using_header internals_internals) + +target_include_directories(${targets_using_header} PRIVATE "${CMAKE_CURRENT_LIST_DIR}") foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") From da080147b743ac0686e494db12b3af63cda03ca6 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 26 Jul 2022 16:34:21 -0700 Subject: [PATCH 63/90] add additional path to find libcugraph to 'INSTALL_RPATH' --- python/cugraph/cugraph/centrality/CMakeLists.txt | 8 +++----- python/cugraph/cugraph/community/CMakeLists.txt | 8 +++----- python/cugraph/cugraph/components/CMakeLists.txt | 8 +++----- python/cugraph/cugraph/cores/CMakeLists.txt | 8 +++----- python/cugraph/cugraph/dask/centrality/CMakeLists.txt | 8 +++----- python/cugraph/cugraph/dask/comms/CMakeLists.txt | 8 +++----- python/cugraph/cugraph/dask/community/CMakeLists.txt | 8 +++----- python/cugraph/cugraph/dask/components/CMakeLists.txt | 8 +++----- python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt | 8 +++----- python/cugraph/cugraph/dask/structure/CMakeLists.txt | 8 +++----- python/cugraph/cugraph/generators/CMakeLists.txt | 8 +++----- python/cugraph/cugraph/internals/CMakeLists.txt | 8 +++----- python/cugraph/cugraph/layout/CMakeLists.txt | 8 +++----- python/cugraph/cugraph/linear_assignment/CMakeLists.txt | 8 +++----- python/cugraph/cugraph/link_analysis/CMakeLists.txt | 8 +++----- python/cugraph/cugraph/link_prediction/CMakeLists.txt | 8 +++----- python/cugraph/cugraph/sampling/CMakeLists.txt | 8 +++----- python/cugraph/cugraph/structure/CMakeLists.txt | 8 +++----- python/cugraph/cugraph/tree/CMakeLists.txt | 8 +++----- python/cugraph/cugraph/utilities/CMakeLists.txt | 8 +++----- python/pylibcugraph/pylibcugraph/CMakeLists.txt | 8 +++----- 21 files changed, 63 insertions(+), 105 deletions(-) diff --git a/python/cugraph/cugraph/centrality/CMakeLists.txt b/python/cugraph/cugraph/centrality/CMakeLists.txt index 55cbf780cb4..e7bec220d8e 100644 --- a/python/cugraph/cugraph/centrality/CMakeLists.txt +++ b/python/cugraph/cugraph/centrality/CMakeLists.txt @@ -29,8 +29,6 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -if(NOT cugraph_FOUND) - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") - endforeach() -endif() +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() diff --git a/python/cugraph/cugraph/community/CMakeLists.txt b/python/cugraph/cugraph/community/CMakeLists.txt index 647a5cc47d9..b945e21e243 100644 --- a/python/cugraph/cugraph/community/CMakeLists.txt +++ b/python/cugraph/cugraph/community/CMakeLists.txt @@ -44,8 +44,6 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -if(NOT cugraph_FOUND) - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") - endforeach() -endif() +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() diff --git a/python/cugraph/cugraph/components/CMakeLists.txt b/python/cugraph/cugraph/components/CMakeLists.txt index 8382ed290b9..92d778bbf79 100644 --- a/python/cugraph/cugraph/components/CMakeLists.txt +++ b/python/cugraph/cugraph/components/CMakeLists.txt @@ -25,8 +25,6 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -if(NOT cugraph_FOUND) - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") - endforeach() -endif() +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() diff --git a/python/cugraph/cugraph/cores/CMakeLists.txt b/python/cugraph/cugraph/cores/CMakeLists.txt index 7d2262227f9..6e14a313b2e 100644 --- a/python/cugraph/cugraph/cores/CMakeLists.txt +++ b/python/cugraph/cugraph/cores/CMakeLists.txt @@ -25,8 +25,6 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -if(NOT cugraph_FOUND) - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") - endforeach() -endif() +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() diff --git a/python/cugraph/cugraph/dask/centrality/CMakeLists.txt b/python/cugraph/cugraph/dask/centrality/CMakeLists.txt index ab11b2912df..1631877d15f 100644 --- a/python/cugraph/cugraph/dask/centrality/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/centrality/CMakeLists.txt @@ -25,8 +25,6 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -if(NOT cugraph_FOUND) - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") - endforeach() -endif() +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() diff --git a/python/cugraph/cugraph/dask/comms/CMakeLists.txt b/python/cugraph/cugraph/dask/comms/CMakeLists.txt index 16fdfdd83b8..195a5ba66c5 100644 --- a/python/cugraph/cugraph/dask/comms/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/comms/CMakeLists.txt @@ -25,8 +25,6 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -if(NOT cugraph_FOUND) - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") - endforeach() -endif() +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() diff --git a/python/cugraph/cugraph/dask/community/CMakeLists.txt b/python/cugraph/cugraph/dask/community/CMakeLists.txt index 8988843498a..7622ad2626e 100644 --- a/python/cugraph/cugraph/dask/community/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/community/CMakeLists.txt @@ -25,8 +25,6 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -if(NOT cugraph_FOUND) - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") - endforeach() -endif() +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() diff --git a/python/cugraph/cugraph/dask/components/CMakeLists.txt b/python/cugraph/cugraph/dask/components/CMakeLists.txt index 191be04c738..f845107c37f 100644 --- a/python/cugraph/cugraph/dask/components/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/components/CMakeLists.txt @@ -25,8 +25,6 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -if(NOT cugraph_FOUND) - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") - endforeach() -endif() +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() diff --git a/python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt b/python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt index b60a4a2ab5c..e8427ca7840 100644 --- a/python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt @@ -25,8 +25,6 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -if(NOT cugraph_FOUND) - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") - endforeach() -endif() +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() diff --git a/python/cugraph/cugraph/dask/structure/CMakeLists.txt b/python/cugraph/cugraph/dask/structure/CMakeLists.txt index e8ead675432..625c008aeb5 100644 --- a/python/cugraph/cugraph/dask/structure/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/structure/CMakeLists.txt @@ -25,8 +25,6 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -if(NOT cugraph_FOUND) - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") - endforeach() -endif() +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() diff --git a/python/cugraph/cugraph/generators/CMakeLists.txt b/python/cugraph/cugraph/generators/CMakeLists.txt index 4c011a20b4f..96a03ab4169 100644 --- a/python/cugraph/cugraph/generators/CMakeLists.txt +++ b/python/cugraph/cugraph/generators/CMakeLists.txt @@ -25,8 +25,6 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -if(NOT cugraph_FOUND) - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") - endforeach() -endif() +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() diff --git a/python/cugraph/cugraph/internals/CMakeLists.txt b/python/cugraph/cugraph/internals/CMakeLists.txt index b0d858c3c24..eff489012d5 100644 --- a/python/cugraph/cugraph/internals/CMakeLists.txt +++ b/python/cugraph/cugraph/internals/CMakeLists.txt @@ -30,8 +30,6 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -if(NOT cugraph_FOUND) - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") - endforeach() -endif() +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() diff --git a/python/cugraph/cugraph/layout/CMakeLists.txt b/python/cugraph/cugraph/layout/CMakeLists.txt index 3518c42afec..12747803016 100644 --- a/python/cugraph/cugraph/layout/CMakeLists.txt +++ b/python/cugraph/cugraph/layout/CMakeLists.txt @@ -25,8 +25,6 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -if(NOT cugraph_FOUND) - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") - endforeach() -endif() +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() diff --git a/python/cugraph/cugraph/linear_assignment/CMakeLists.txt b/python/cugraph/cugraph/linear_assignment/CMakeLists.txt index 08327d00cc8..7ba81843457 100644 --- a/python/cugraph/cugraph/linear_assignment/CMakeLists.txt +++ b/python/cugraph/cugraph/linear_assignment/CMakeLists.txt @@ -25,8 +25,6 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -if(NOT cugraph_FOUND) - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") - endforeach() -endif() +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() diff --git a/python/cugraph/cugraph/link_analysis/CMakeLists.txt b/python/cugraph/cugraph/link_analysis/CMakeLists.txt index 4e1683d6196..89732c1b7e4 100644 --- a/python/cugraph/cugraph/link_analysis/CMakeLists.txt +++ b/python/cugraph/cugraph/link_analysis/CMakeLists.txt @@ -25,8 +25,6 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -if(NOT cugraph_FOUND) - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") - endforeach() -endif() +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() diff --git a/python/cugraph/cugraph/link_prediction/CMakeLists.txt b/python/cugraph/cugraph/link_prediction/CMakeLists.txt index ca625a929b1..fb8491799be 100644 --- a/python/cugraph/cugraph/link_prediction/CMakeLists.txt +++ b/python/cugraph/cugraph/link_prediction/CMakeLists.txt @@ -25,8 +25,6 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -if(NOT cugraph_FOUND) - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") - endforeach() -endif() +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() diff --git a/python/cugraph/cugraph/sampling/CMakeLists.txt b/python/cugraph/cugraph/sampling/CMakeLists.txt index d29f010a2c2..612589f7132 100644 --- a/python/cugraph/cugraph/sampling/CMakeLists.txt +++ b/python/cugraph/cugraph/sampling/CMakeLists.txt @@ -25,8 +25,6 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -if(NOT cugraph_FOUND) - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") - endforeach() -endif() +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() diff --git a/python/cugraph/cugraph/structure/CMakeLists.txt b/python/cugraph/cugraph/structure/CMakeLists.txt index c14ed0d8e0d..95a54530ada 100644 --- a/python/cugraph/cugraph/structure/CMakeLists.txt +++ b/python/cugraph/cugraph/structure/CMakeLists.txt @@ -25,8 +25,6 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -if(NOT cugraph_FOUND) - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") - endforeach() -endif() +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() diff --git a/python/cugraph/cugraph/tree/CMakeLists.txt b/python/cugraph/cugraph/tree/CMakeLists.txt index 7d86c41ec36..dd0e333b494 100644 --- a/python/cugraph/cugraph/tree/CMakeLists.txt +++ b/python/cugraph/cugraph/tree/CMakeLists.txt @@ -25,8 +25,6 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -if(NOT cugraph_FOUND) - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") - endforeach() -endif() +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() diff --git a/python/cugraph/cugraph/utilities/CMakeLists.txt b/python/cugraph/cugraph/utilities/CMakeLists.txt index fea41d15acc..362ceaecf1a 100644 --- a/python/cugraph/cugraph/utilities/CMakeLists.txt +++ b/python/cugraph/cugraph/utilities/CMakeLists.txt @@ -25,8 +25,6 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -if(NOT cugraph_FOUND) - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") - endforeach() -endif() +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() diff --git a/python/pylibcugraph/pylibcugraph/CMakeLists.txt b/python/pylibcugraph/pylibcugraph/CMakeLists.txt index e73fa16f95e..4c7f89f21c2 100644 --- a/python/pylibcugraph/pylibcugraph/CMakeLists.txt +++ b/python/pylibcugraph/pylibcugraph/CMakeLists.txt @@ -43,8 +43,6 @@ foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() -if(NOT cugraph_FOUND) - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/library") - endforeach() -endif() +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") +endforeach() From d601eaa76bf7a17822389c36b74038636f31c436 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 26 Jul 2022 16:51:29 -0700 Subject: [PATCH 64/90] add subdir to the appropriate CMake list --- python/pylibcugraph/CMakeLists.txt | 4 ---- python/pylibcugraph/pylibcugraph/CMakeLists.txt | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/python/pylibcugraph/CMakeLists.txt b/python/pylibcugraph/CMakeLists.txt index b47a20ce8f5..331f7a6a309 100644 --- a/python/pylibcugraph/CMakeLists.txt +++ b/python/pylibcugraph/CMakeLists.txt @@ -60,8 +60,6 @@ if(NOT cugraph_FOUND) # rapids_cuda_init_architectures relies on `project` including. include("${CMAKE_PROJECT_cugraph-python_INCLUDE}") - - # FIXME: are those parameter necessary? message(STATUS "installing CUGRAPH C++") add_subdirectory(../../cpp cugraph-cpp) @@ -74,5 +72,3 @@ include(rapids-cython) rapids_cython_init() add_subdirectory(pylibcugraph) -add_subdirectory(pylibcugraph/components) -add_subdirectory(pylibcugraph/raft/common) diff --git a/python/pylibcugraph/pylibcugraph/CMakeLists.txt b/python/pylibcugraph/pylibcugraph/CMakeLists.txt index 4c7f89f21c2..f197e8e1c30 100644 --- a/python/pylibcugraph/pylibcugraph/CMakeLists.txt +++ b/python/pylibcugraph/pylibcugraph/CMakeLists.txt @@ -11,6 +11,8 @@ # or implied. See the License for the specific language governing permissions and limitations under # the License. # ============================================================================= +add_subdirectory(components) +add_subdirectory(raft/common) set(cython_sources bfs.pyx core_number.pyx From 3cf6f3905f41e5f85d9bc4d2139e9d384a38799b Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 26 Jul 2022 16:53:17 -0700 Subject: [PATCH 65/90] fix typo --- python/cugraph/setuputils.py | 2 +- python/pylibcugraph/setuputils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/cugraph/setuputils.py b/python/cugraph/setuputils.py index 83269fa240c..dfddb74928a 100644 --- a/python/cugraph/setuputils.py +++ b/python/cugraph/setuputils.py @@ -247,7 +247,7 @@ def _get_repo_path(): return str(python_dir.parent.parent.absolute()) -def get_cuda_version_from_header(cuda_include_dir, delimeter=""): +def get_cuda_version_from_header(cuda_include_dir, delimiter=""): cuda_version = None diff --git a/python/pylibcugraph/setuputils.py b/python/pylibcugraph/setuputils.py index 279aca1bbe4..d317323c976 100644 --- a/python/pylibcugraph/setuputils.py +++ b/python/pylibcugraph/setuputils.py @@ -247,7 +247,7 @@ def _get_repo_path(): return str(python_dir.parent.parent.absolute()) -def get_cuda_version_from_header(cuda_include_dir, delimeter=""): +def get_cuda_version_from_header(cuda_include_dir, delimiter=""): cuda_version = None From f3e9d36a607de5d79dccae7a5e52156594526cc8 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 26 Jul 2022 17:01:21 -0700 Subject: [PATCH 66/90] update .toml files --- python/cugraph/pyproject.toml | 17 +---------------- python/pylibcugraph/pyproject.toml | 17 +---------------- 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/python/cugraph/pyproject.toml b/python/cugraph/pyproject.toml index c120e900a5f..48a9976880f 100644 --- a/python/cugraph/pyproject.toml +++ b/python/cugraph/pyproject.toml @@ -14,19 +14,4 @@ requires = [ [tool.black] line-length = 79 target-version = ["py36"] -include = '\.py?$' -exclude = ''' -/( - thirdparty | - \.eggs | - \.git | - \.hg | - \.mypy_cache | - \.tox | - \.venv | - _build | - buck-out | - build | - dist -)/ -''' \ No newline at end of file +include = '\.py?$' \ No newline at end of file diff --git a/python/pylibcugraph/pyproject.toml b/python/pylibcugraph/pyproject.toml index c120e900a5f..48a9976880f 100644 --- a/python/pylibcugraph/pyproject.toml +++ b/python/pylibcugraph/pyproject.toml @@ -14,19 +14,4 @@ requires = [ [tool.black] line-length = 79 target-version = ["py36"] -include = '\.py?$' -exclude = ''' -/( - thirdparty | - \.eggs | - \.git | - \.hg | - \.mypy_cache | - \.tox | - \.venv | - _build | - buck-out | - build | - dist -)/ -''' \ No newline at end of file +include = '\.py?$' \ No newline at end of file From 19e7dd790f0705f9328da43677dfdaee107af636 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 26 Jul 2022 17:02:15 -0700 Subject: [PATCH 67/90] fix typo --- python/cugraph/setuputils.py | 2 +- python/pylibcugraph/setuputils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/cugraph/setuputils.py b/python/cugraph/setuputils.py index dfddb74928a..af3ea1e83ef 100644 --- a/python/cugraph/setuputils.py +++ b/python/cugraph/setuputils.py @@ -262,6 +262,6 @@ def get_cuda_version_from_header(cuda_include_dir, delimiter=""): cuda_version = int(cuda_version.split()[2]) return "%d%s%d" % ( cuda_version // 1000, - delimeter, + delimiter, (cuda_version % 1000) // 10, ) diff --git a/python/pylibcugraph/setuputils.py b/python/pylibcugraph/setuputils.py index d317323c976..a808165f432 100644 --- a/python/pylibcugraph/setuputils.py +++ b/python/pylibcugraph/setuputils.py @@ -262,6 +262,6 @@ def get_cuda_version_from_header(cuda_include_dir, delimiter=""): cuda_version = int(cuda_version.split()[2]) return "%d%s%d" % ( cuda_version // 1000, - delimeter, + delimiter, (cuda_version % 1000) // 10, ) From 9e9155edcc84678b796fb21386d6a906498df682 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 26 Jul 2022 17:32:15 -0700 Subject: [PATCH 68/90] do a single fetch of the rapids cmake file --- cpp/CMakeLists.txt | 4 +--- fetch_rapids.cmake | 17 +++++++++++++++++ python/cugraph/CMakeLists.txt | 4 +--- python/pylibcugraph/CMakeLists.txt | 4 +--- .../pylibcugraph/utilities/api_tools.py | 2 +- 5 files changed, 21 insertions(+), 10 deletions(-) create mode 100644 fetch_rapids.cmake diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 7a681c9a99f..7f2feb11cdf 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -15,10 +15,8 @@ #============================================================================= cmake_minimum_required(VERSION 3.20.1 FATAL_ERROR) -file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-22.08/RAPIDS.cmake - ${CMAKE_BINARY_DIR}/RAPIDS.cmake) -include(${CMAKE_BINARY_DIR}/RAPIDS.cmake) +include(../fetch_rapids.cmake) include(rapids-cmake) include(rapids-cpm) include(rapids-cuda) diff --git a/fetch_rapids.cmake b/fetch_rapids.cmake new file mode 100644 index 00000000000..8d066040c6f --- /dev/null +++ b/fetch_rapids.cmake @@ -0,0 +1,17 @@ +# ============================================================================= +# Copyright (c) 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. +# ============================================================================= +file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-22.08/RAPIDS.cmake + ${CMAKE_BINARY_DIR}/RAPIDS.cmake +) +include(${CMAKE_BINARY_DIR}/RAPIDS.cmake) \ No newline at end of file diff --git a/python/cugraph/CMakeLists.txt b/python/cugraph/CMakeLists.txt index ec122f36e02..032a2dd35c9 100644 --- a/python/cugraph/CMakeLists.txt +++ b/python/cugraph/CMakeLists.txt @@ -16,9 +16,7 @@ cmake_minimum_required(VERSION 3.20.1 FATAL_ERROR) set(cugraph_version 22.08.00) -file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-22.08/RAPIDS.cmake - ${CMAKE_BINARY_DIR}/RAPIDS.cmake) -include(${CMAKE_BINARY_DIR}/RAPIDS.cmake) +include(../../fetch_rapids.cmake) project( cugraph-python diff --git a/python/pylibcugraph/CMakeLists.txt b/python/pylibcugraph/CMakeLists.txt index 331f7a6a309..23d9f810850 100644 --- a/python/pylibcugraph/CMakeLists.txt +++ b/python/pylibcugraph/CMakeLists.txt @@ -16,9 +16,7 @@ cmake_minimum_required(VERSION 3.20.1 FATAL_ERROR) set(pylibcugraph_version 22.08.00) -file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-22.08/RAPIDS.cmake - ${CMAKE_BINARY_DIR}/RAPIDS.cmake) -include(${CMAKE_BINARY_DIR}/RAPIDS.cmake) +include(../../fetch_rapids.cmake) project( pylibcugraph-python diff --git a/python/pylibcugraph/pylibcugraph/utilities/api_tools.py b/python/pylibcugraph/pylibcugraph/utilities/api_tools.py index d676154241b..cb60b55e806 100644 --- a/python/pylibcugraph/pylibcugraph/utilities/api_tools.py +++ b/python/pylibcugraph/pylibcugraph/utilities/api_tools.py @@ -34,7 +34,7 @@ def experimental_warning_wrapper(obj): discovered and used. """ obj_type = type(obj) - if not isinstance(obj, typing.Callable): + if not callable(obj): raise TypeError("obj must be a class or a function type, got " f"{obj_type}") From b759fcd812cda48e09b1e7d826f079faa347406c Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 26 Jul 2022 18:10:23 -0700 Subject: [PATCH 69/90] do not include 'numpy C-API' because it is not used by any targets --- python/cugraph/cugraph/centrality/CMakeLists.txt | 5 ----- python/cugraph/cugraph/community/CMakeLists.txt | 4 ---- python/cugraph/cugraph/components/CMakeLists.txt | 5 ----- python/cugraph/cugraph/cores/CMakeLists.txt | 5 ----- python/cugraph/cugraph/dask/centrality/CMakeLists.txt | 5 ----- python/cugraph/cugraph/dask/comms/CMakeLists.txt | 5 ----- python/cugraph/cugraph/dask/community/CMakeLists.txt | 5 ----- python/cugraph/cugraph/dask/components/CMakeLists.txt | 5 ----- python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt | 5 ----- python/cugraph/cugraph/dask/structure/CMakeLists.txt | 5 ----- python/cugraph/cugraph/generators/CMakeLists.txt | 5 ----- python/cugraph/cugraph/internals/CMakeLists.txt | 6 ------ python/cugraph/cugraph/layout/CMakeLists.txt | 5 ----- python/cugraph/cugraph/linear_assignment/CMakeLists.txt | 5 ----- python/cugraph/cugraph/link_analysis/CMakeLists.txt | 5 ----- python/cugraph/cugraph/link_prediction/CMakeLists.txt | 5 ----- python/cugraph/cugraph/sampling/CMakeLists.txt | 5 ----- python/cugraph/cugraph/structure/CMakeLists.txt | 5 ----- python/cugraph/cugraph/tree/CMakeLists.txt | 5 ----- python/pylibcugraph/pylibcugraph/CMakeLists.txt | 4 ---- 20 files changed, 99 deletions(-) diff --git a/python/cugraph/cugraph/centrality/CMakeLists.txt b/python/cugraph/cugraph/centrality/CMakeLists.txt index e7bec220d8e..68b9c244690 100644 --- a/python/cugraph/cugraph/centrality/CMakeLists.txt +++ b/python/cugraph/cugraph/centrality/CMakeLists.txt @@ -24,11 +24,6 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX centrality_ ) -set(targets_using_numpy centrality_betweenness_centrality_wrapper centrality_edge_betweenness_centrality_wrapper) -foreach(target IN LISTS targets_using_numpy) - target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") -endforeach() - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() diff --git a/python/cugraph/cugraph/community/CMakeLists.txt b/python/cugraph/cugraph/community/CMakeLists.txt index b945e21e243..ac4cff27196 100644 --- a/python/cugraph/cugraph/community/CMakeLists.txt +++ b/python/cugraph/cugraph/community/CMakeLists.txt @@ -40,10 +40,6 @@ set(targets_using_numpy community_triangle_count_wrapper ) -foreach(target IN LISTS targets_using_numpy) - target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") -endforeach() - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() diff --git a/python/cugraph/cugraph/components/CMakeLists.txt b/python/cugraph/cugraph/components/CMakeLists.txt index 92d778bbf79..4a6efa3bdb1 100644 --- a/python/cugraph/cugraph/components/CMakeLists.txt +++ b/python/cugraph/cugraph/components/CMakeLists.txt @@ -20,11 +20,6 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX components_ ) -set(targets_using_numpy components_connectivity_wrapper) -foreach(target IN LISTS targets_using_numpy) - target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") -endforeach() - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() diff --git a/python/cugraph/cugraph/cores/CMakeLists.txt b/python/cugraph/cugraph/cores/CMakeLists.txt index 6e14a313b2e..c87a8a9c134 100644 --- a/python/cugraph/cugraph/cores/CMakeLists.txt +++ b/python/cugraph/cugraph/cores/CMakeLists.txt @@ -20,11 +20,6 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX cores_ ) -set(targets_using_numpy cores_k_core_wrapper) -foreach(target IN LISTS targets_using_numpy) - target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") -endforeach() - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() diff --git a/python/cugraph/cugraph/dask/centrality/CMakeLists.txt b/python/cugraph/cugraph/dask/centrality/CMakeLists.txt index 1631877d15f..1fb434eeee9 100644 --- a/python/cugraph/cugraph/dask/centrality/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/centrality/CMakeLists.txt @@ -20,11 +20,6 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX centrality_ ) -set(targets_using_numpy centrality_mg_katz_centrality_wrapper) -foreach(target IN LISTS targets_using_numpy) - target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") -endforeach() - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() diff --git a/python/cugraph/cugraph/dask/comms/CMakeLists.txt b/python/cugraph/cugraph/dask/comms/CMakeLists.txt index 195a5ba66c5..f9fe538f1bd 100644 --- a/python/cugraph/cugraph/dask/comms/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/comms/CMakeLists.txt @@ -20,11 +20,6 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX comms_ ) -set(targets_using_numpy comms_comms_wrapper) -foreach(target IN LISTS targets_using_numpy) - target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") -endforeach() - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() diff --git a/python/cugraph/cugraph/dask/community/CMakeLists.txt b/python/cugraph/cugraph/dask/community/CMakeLists.txt index 7622ad2626e..2a1f12078d3 100644 --- a/python/cugraph/cugraph/dask/community/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/community/CMakeLists.txt @@ -20,11 +20,6 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX dask_community_ ) -set(targets_using_numpy dask_community_louvain_wrapper) -foreach(target IN LISTS targets_using_numpy) - target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") -endforeach() - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() diff --git a/python/cugraph/cugraph/dask/components/CMakeLists.txt b/python/cugraph/cugraph/dask/components/CMakeLists.txt index f845107c37f..78fc7e9e1c7 100644 --- a/python/cugraph/cugraph/dask/components/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/components/CMakeLists.txt @@ -20,11 +20,6 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX components_ ) -set(targets_using_numpy components_mg_connectivity_wrapper) -foreach(target IN LISTS targets_using_numpy) - target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") -endforeach() - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() diff --git a/python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt b/python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt index e8427ca7840..cc4fa264101 100644 --- a/python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt @@ -20,11 +20,6 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX link_analysis_ ) -set(targets_using_numpy link_analysis_mg_pagerank_wrapper) -foreach(target IN LISTS targets_using_numpy) - target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") -endforeach() - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() diff --git a/python/cugraph/cugraph/dask/structure/CMakeLists.txt b/python/cugraph/cugraph/dask/structure/CMakeLists.txt index 625c008aeb5..d1c9bdc2620 100644 --- a/python/cugraph/cugraph/dask/structure/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/structure/CMakeLists.txt @@ -20,11 +20,6 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX structure_ ) -set(targets_using_numpy structure_replication) -foreach(target IN LISTS targets_using_numpy) - target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") -endforeach() - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() diff --git a/python/cugraph/cugraph/generators/CMakeLists.txt b/python/cugraph/cugraph/generators/CMakeLists.txt index 96a03ab4169..6edf6acc903 100644 --- a/python/cugraph/cugraph/generators/CMakeLists.txt +++ b/python/cugraph/cugraph/generators/CMakeLists.txt @@ -20,11 +20,6 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX generators_ ) -set(targets_using_numpy generators_rmat_wrapper) -foreach(target IN LISTS targets_using_numpy) - target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") -endforeach() - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() diff --git a/python/cugraph/cugraph/internals/CMakeLists.txt b/python/cugraph/cugraph/internals/CMakeLists.txt index eff489012d5..f843ffa2f90 100644 --- a/python/cugraph/cugraph/internals/CMakeLists.txt +++ b/python/cugraph/cugraph/internals/CMakeLists.txt @@ -20,16 +20,10 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX internals_ ) -set(targets_using_numpy internals_internals) - set(targets_using_header internals_internals) target_include_directories(${targets_using_header} PRIVATE "${CMAKE_CURRENT_LIST_DIR}") -foreach(target IN LISTS targets_using_numpy) - target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") -endforeach() - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() diff --git a/python/cugraph/cugraph/layout/CMakeLists.txt b/python/cugraph/cugraph/layout/CMakeLists.txt index 12747803016..96f425cc1ed 100644 --- a/python/cugraph/cugraph/layout/CMakeLists.txt +++ b/python/cugraph/cugraph/layout/CMakeLists.txt @@ -20,11 +20,6 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX layout_ ) -set(targets_using_numpy layout_force_atlas2_wrapper) -foreach(target IN LISTS targets_using_numpy) - target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") -endforeach() - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() diff --git a/python/cugraph/cugraph/linear_assignment/CMakeLists.txt b/python/cugraph/cugraph/linear_assignment/CMakeLists.txt index 7ba81843457..618c04d1f0a 100644 --- a/python/cugraph/cugraph/linear_assignment/CMakeLists.txt +++ b/python/cugraph/cugraph/linear_assignment/CMakeLists.txt @@ -20,11 +20,6 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX linear_assignment_ ) -set(targets_using_numpy linear_assignment_lap_wrapper) -foreach(target IN LISTS targets_using_numpy) - target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") -endforeach() - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() diff --git a/python/cugraph/cugraph/link_analysis/CMakeLists.txt b/python/cugraph/cugraph/link_analysis/CMakeLists.txt index 89732c1b7e4..30dbe239ea9 100644 --- a/python/cugraph/cugraph/link_analysis/CMakeLists.txt +++ b/python/cugraph/cugraph/link_analysis/CMakeLists.txt @@ -20,11 +20,6 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX link_analysis_ ) -set(targets_using_numpy link_analysis_pagerank_wrapper) -foreach(target IN LISTS targets_using_numpy) - target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") -endforeach() - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() diff --git a/python/cugraph/cugraph/link_prediction/CMakeLists.txt b/python/cugraph/cugraph/link_prediction/CMakeLists.txt index fb8491799be..6b5931775a3 100644 --- a/python/cugraph/cugraph/link_prediction/CMakeLists.txt +++ b/python/cugraph/cugraph/link_prediction/CMakeLists.txt @@ -20,11 +20,6 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX link_prediction_ ) -set(targets_using_numpy link_prediction_jaccard_wrapper link_prediction_overlap_wrapper) -foreach(target IN LISTS targets_using_numpy) - target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") -endforeach() - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() diff --git a/python/cugraph/cugraph/sampling/CMakeLists.txt b/python/cugraph/cugraph/sampling/CMakeLists.txt index 612589f7132..bb2cee3a6ec 100644 --- a/python/cugraph/cugraph/sampling/CMakeLists.txt +++ b/python/cugraph/cugraph/sampling/CMakeLists.txt @@ -20,11 +20,6 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX sampling_ ) -set(targets_using_numpy sampling_random_walks_wrapper) -foreach(target IN LISTS targets_using_numpy) - target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") -endforeach() - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() diff --git a/python/cugraph/cugraph/structure/CMakeLists.txt b/python/cugraph/cugraph/structure/CMakeLists.txt index 95a54530ada..8dbd9e29c71 100644 --- a/python/cugraph/cugraph/structure/CMakeLists.txt +++ b/python/cugraph/cugraph/structure/CMakeLists.txt @@ -20,11 +20,6 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX structure_ ) -set(targets_using_numpy structure_graph_primtypes_wrapper structure_graph_primtypes structure_renumber_wrapper structure_utils_wrapper) -foreach(target IN LISTS targets_using_numpy) - target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") -endforeach() - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() diff --git a/python/cugraph/cugraph/tree/CMakeLists.txt b/python/cugraph/cugraph/tree/CMakeLists.txt index dd0e333b494..389a1825117 100644 --- a/python/cugraph/cugraph/tree/CMakeLists.txt +++ b/python/cugraph/cugraph/tree/CMakeLists.txt @@ -20,11 +20,6 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX tree_ ) -set(targets_using_numpy tree_minimum_spanning_tree_wrapper) -foreach(target IN LISTS targets_using_numpy) - target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") -endforeach() - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() diff --git a/python/pylibcugraph/pylibcugraph/CMakeLists.txt b/python/pylibcugraph/pylibcugraph/CMakeLists.txt index f197e8e1c30..d8e82da4807 100644 --- a/python/pylibcugraph/pylibcugraph/CMakeLists.txt +++ b/python/pylibcugraph/pylibcugraph/CMakeLists.txt @@ -44,7 +44,3 @@ set(targets_using_numpy pagerank sssp utils) foreach(target IN LISTS targets_using_numpy) target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") endforeach() - -foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") -endforeach() From 00eec4a6a6c7268c2db98137ef92ba32f9c4c490 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 26 Jul 2022 18:18:18 -0700 Subject: [PATCH 70/90] fix style --- python/cugraph/setup.py | 2 +- python/pylibcugraph/pylibcugraph/utilities/api_tools.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/python/cugraph/setup.py b/python/cugraph/setup.py index cd9638510fd..2357d13f4f3 100644 --- a/python/cugraph/setup.py +++ b/python/cugraph/setup.py @@ -76,7 +76,7 @@ def run(self): PACKAGE_DATA['cugraph'].extend( ['cugraph/experimental/datasets/metadata/*.yaml', - 'cugraph/experimental/datasets/*.yaml']) + 'cugraph/experimental/datasets/*.yaml']) setup(name='cugraph', diff --git a/python/pylibcugraph/pylibcugraph/utilities/api_tools.py b/python/pylibcugraph/pylibcugraph/utilities/api_tools.py index cb60b55e806..9be2d2bc70d 100644 --- a/python/pylibcugraph/pylibcugraph/utilities/api_tools.py +++ b/python/pylibcugraph/pylibcugraph/utilities/api_tools.py @@ -15,7 +15,6 @@ import warnings import inspect import types -import typing experimental_prefix = "EXPERIMENTAL" From 109ac6e5e0f6d450cd2ce86b1e1a839a90bdc338 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 26 Jul 2022 18:41:43 -0700 Subject: [PATCH 71/90] do not include 'numpy C-API' because it is not used by any targets --- python/pylibcugraph/pylibcugraph/CMakeLists.txt | 8 -------- 1 file changed, 8 deletions(-) diff --git a/python/pylibcugraph/pylibcugraph/CMakeLists.txt b/python/pylibcugraph/pylibcugraph/CMakeLists.txt index d8e82da4807..02e8b33f8ea 100644 --- a/python/pylibcugraph/pylibcugraph/CMakeLists.txt +++ b/python/pylibcugraph/pylibcugraph/CMakeLists.txt @@ -36,11 +36,3 @@ rapids_cython_create_modules( SOURCE_FILES "${cython_sources}" LINKED_LIBRARIES ${linked_libraries} ) - -# TODO: Finding NumPy requires finding Development as well. Once this is fixed in CMake (no date -# yet) we can remove the extra component spec. -find_package(Python REQUIRED COMPONENTS Development NumPy) -set(targets_using_numpy pagerank sssp utils) -foreach(target IN LISTS targets_using_numpy) - target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") -endforeach() From 7381462f7dc3843f2ae47638921bf2574b5aa4f8 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 26 Jul 2022 18:42:26 -0700 Subject: [PATCH 72/90] add end of line --- ci/cpu/build.sh | 2 +- fetch_rapids.cmake | 2 +- python/pylibcugraph/CMakeLists.txt | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index ef32c181aaf..f638bf85add 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -118,4 +118,4 @@ fi ################################################################################ gpuci_logger "Upload conda packages" -source ci/cpu/upload.sh \ No newline at end of file +source ci/cpu/upload.sh diff --git a/fetch_rapids.cmake b/fetch_rapids.cmake index 8d066040c6f..2b5c7e9d352 100644 --- a/fetch_rapids.cmake +++ b/fetch_rapids.cmake @@ -14,4 +14,4 @@ file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-22.08/RAPIDS.cmake ${CMAKE_BINARY_DIR}/RAPIDS.cmake ) -include(${CMAKE_BINARY_DIR}/RAPIDS.cmake) \ No newline at end of file +include(${CMAKE_BINARY_DIR}/RAPIDS.cmake) diff --git a/python/pylibcugraph/CMakeLists.txt b/python/pylibcugraph/CMakeLists.txt index 23d9f810850..898ae43ee0f 100644 --- a/python/pylibcugraph/CMakeLists.txt +++ b/python/pylibcugraph/CMakeLists.txt @@ -53,7 +53,6 @@ if(NOT cugraph_FOUND) rapids_cuda_init_architectures(CUGRAPH) enable_language(CUDA) - # FIXME: check of this is necessary # Since cugraph only enables CUDA optionally, we need to manually include the file that # rapids_cuda_init_architectures relies on `project` including. From 014a3428d049aeba6d59f84339c741144bef9606 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 26 Jul 2022 18:45:16 -0700 Subject: [PATCH 73/90] remove outdated docstrings --- python/pylibcugraph/pylibcugraph/components/CMakeLists.txt | 2 -- python/pylibcugraph/pylibcugraph/raft/common/CMakeLists.txt | 2 -- 2 files changed, 4 deletions(-) diff --git a/python/pylibcugraph/pylibcugraph/components/CMakeLists.txt b/python/pylibcugraph/pylibcugraph/components/CMakeLists.txt index ee8a2b73116..8f156c0e6d2 100644 --- a/python/pylibcugraph/pylibcugraph/components/CMakeLists.txt +++ b/python/pylibcugraph/pylibcugraph/components/CMakeLists.txt @@ -16,8 +16,6 @@ set(cython_sources _connectivity.pyx ) set(linked_libraries cugraph::cugraph) -#set(linked_libraries "/jnke/scikit-build-pr/cugraph/cpp") -#message(STATUS "linked library is ${linked_libraries}") rapids_cython_create_modules( CXX diff --git a/python/pylibcugraph/pylibcugraph/raft/common/CMakeLists.txt b/python/pylibcugraph/pylibcugraph/raft/common/CMakeLists.txt index 051f85c8e32..596f7448873 100644 --- a/python/pylibcugraph/pylibcugraph/raft/common/CMakeLists.txt +++ b/python/pylibcugraph/pylibcugraph/raft/common/CMakeLists.txt @@ -17,8 +17,6 @@ set(cython_sources handle.pyx ) set(linked_libraries cugraph::cugraph) -#set(linked_libraries "/jnke/scikit-build-pr/cugraph/cpp") -#message(STATUS "linked library is ${linked_libraries}") rapids_cython_create_modules( CXX From 21e6b5e1f5ad090c0aa743dcbd29dbf3326bb1b9 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 26 Jul 2022 18:46:19 -0700 Subject: [PATCH 74/90] add end of line --- python/cugraph/pyproject.toml | 2 +- python/pylibcugraph/pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/cugraph/pyproject.toml b/python/cugraph/pyproject.toml index 48a9976880f..78172f3e34b 100644 --- a/python/cugraph/pyproject.toml +++ b/python/cugraph/pyproject.toml @@ -14,4 +14,4 @@ requires = [ [tool.black] line-length = 79 target-version = ["py36"] -include = '\.py?$' \ No newline at end of file +include = '\.py?$' diff --git a/python/pylibcugraph/pyproject.toml b/python/pylibcugraph/pyproject.toml index 48a9976880f..78172f3e34b 100644 --- a/python/pylibcugraph/pyproject.toml +++ b/python/pylibcugraph/pyproject.toml @@ -14,4 +14,4 @@ requires = [ [tool.black] line-length = 79 target-version = ["py36"] -include = '\.py?$' \ No newline at end of file +include = '\.py?$' From 50d320a8ea53555b4ef3228a09f9587d45580fe4 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 26 Jul 2022 19:14:02 -0700 Subject: [PATCH 75/90] install metadata in experimental.datasets --- python/cugraph/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cugraph/setup.py b/python/cugraph/setup.py index 2357d13f4f3..4f351f2dac9 100644 --- a/python/cugraph/setup.py +++ b/python/cugraph/setup.py @@ -74,7 +74,7 @@ def run(self): PACKAGE_DATA = { key: ["*.pxd"] for key in find_packages(include=["cugraph*"])} -PACKAGE_DATA['cugraph'].extend( +PACKAGE_DATA['cugraph.experimental.datasets'].extend( ['cugraph/experimental/datasets/metadata/*.yaml', 'cugraph/experimental/datasets/*.yaml']) From c45269ea7a9dd15e4404279a404275b09b78cff1 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 26 Jul 2022 19:15:26 -0700 Subject: [PATCH 76/90] fix style --- python/pylibcugraph/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/python/pylibcugraph/CMakeLists.txt b/python/pylibcugraph/CMakeLists.txt index 898ae43ee0f..a33365d78a7 100644 --- a/python/pylibcugraph/CMakeLists.txt +++ b/python/pylibcugraph/CMakeLists.txt @@ -39,7 +39,6 @@ option(FIND_CUGRAPH_CPP "Search for existing CUGRAPH C++ installations before de if(FIND_CUGRAPH_CPP) message(STATUS "Trying to find the package") find_package(cugraph ${cugraph_version} REQUIRED) - else() set(cugraph_FOUND OFF) endif() From 4ace3ece173062099e975b81b875b487af13d9de Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Tue, 26 Jul 2022 19:28:46 -0700 Subject: [PATCH 77/90] remove print --- python/cugraph/CMakeLists.txt | 2 -- python/pylibcugraph/CMakeLists.txt | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/python/cugraph/CMakeLists.txt b/python/cugraph/CMakeLists.txt index 032a2dd35c9..f90035f9460 100644 --- a/python/cugraph/CMakeLists.txt +++ b/python/cugraph/CMakeLists.txt @@ -53,8 +53,6 @@ if(NOT cugraph_FOUND) include("${CMAKE_PROJECT_cugraph-python_INCLUDE}") - - message(STATUS "installing CUGRAPH C++") add_subdirectory(../../cpp cugraph-cpp) install(TARGETS cugraph DESTINATION cugraph/library) diff --git a/python/pylibcugraph/CMakeLists.txt b/python/pylibcugraph/CMakeLists.txt index a33365d78a7..030da9c3e38 100644 --- a/python/pylibcugraph/CMakeLists.txt +++ b/python/pylibcugraph/CMakeLists.txt @@ -56,8 +56,7 @@ if(NOT cugraph_FOUND) # rapids_cuda_init_architectures relies on `project` including. include("${CMAKE_PROJECT_cugraph-python_INCLUDE}") - - message(STATUS "installing CUGRAPH C++") + add_subdirectory(../../cpp cugraph-cpp) install(TARGETS cugraph DESTINATION pylibcugraph/library) From fc4a22be4987b9f75c64c0ffba23c2812f1d71c6 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Wed, 27 Jul 2022 06:01:12 -0700 Subject: [PATCH 78/90] include package data --- python/cugraph/setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/cugraph/setup.py b/python/cugraph/setup.py index 4f351f2dac9..ca8668014f1 100644 --- a/python/cugraph/setup.py +++ b/python/cugraph/setup.py @@ -95,6 +95,7 @@ def run(self): setup_requires=['Cython>=0.29,<0.30'], packages=find_packages(include=['cugraph', 'cugraph.*']), package_data=PACKAGE_DATA, + include_package_data=True, install_requires=INSTALL_REQUIRES, license="Apache", cmdclass=cmdclass, From 4dff3caf5a6cd8c382503e477a5d37f66694da1b Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Wed, 27 Jul 2022 06:35:10 -0700 Subject: [PATCH 79/90] remove unused code --- python/cugraph/cugraph/community/CMakeLists.txt | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/python/cugraph/cugraph/community/CMakeLists.txt b/python/cugraph/cugraph/community/CMakeLists.txt index ac4cff27196..db5f9a8a3b1 100644 --- a/python/cugraph/cugraph/community/CMakeLists.txt +++ b/python/cugraph/cugraph/community/CMakeLists.txt @@ -29,17 +29,6 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX community_ ) -set(targets_using_numpy - community_ecg_wrapper - community_egonet_wrapper - community_ktruss_subgraph_wrapper - community_leiden_wrapper - community_louvain_wrapper - community_spectral_clustering_wrapper - community_subgraph_extraction_wrapper - community_triangle_count_wrapper -) - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() From 7c46801cb73cd958f7f81c6b85357d8d34563b51 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Wed, 27 Jul 2022 06:37:30 -0700 Subject: [PATCH 80/90] simplify function call --- python/cugraph/cugraph/internals/CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/python/cugraph/cugraph/internals/CMakeLists.txt b/python/cugraph/cugraph/internals/CMakeLists.txt index f843ffa2f90..461a96615a7 100644 --- a/python/cugraph/cugraph/internals/CMakeLists.txt +++ b/python/cugraph/cugraph/internals/CMakeLists.txt @@ -20,9 +20,7 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX internals_ ) -set(targets_using_header internals_internals) - -target_include_directories(${targets_using_header} PRIVATE "${CMAKE_CURRENT_LIST_DIR}") +target_include_directories(internals_internals PRIVATE "${CMAKE_CURRENT_LIST_DIR}") foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") From aea415ea843ea5791814c094d4ee1a69f700e39d Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Wed, 27 Jul 2022 10:00:58 -0700 Subject: [PATCH 81/90] simplify function call --- python/pylibcugraph/pylibcugraph/utilities/api_tools.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/python/pylibcugraph/pylibcugraph/utilities/api_tools.py b/python/pylibcugraph/pylibcugraph/utilities/api_tools.py index 9be2d2bc70d..dfb646a0784 100644 --- a/python/pylibcugraph/pylibcugraph/utilities/api_tools.py +++ b/python/pylibcugraph/pylibcugraph/utilities/api_tools.py @@ -102,9 +102,7 @@ def promoted_experimental_warning_wrapper(obj): have the experimental namespace. """ obj_type = type(obj) - # if obj_type not in [type, types.FunctionType, types.BuiltinFunctionType]: - if not isinstance( - obj_type, (type, types.FunctionType, types.BuiltinFunctionType)): + if not callable(obj): raise TypeError("obj must be a class or a function type, got " f"{obj_type}") @@ -156,9 +154,7 @@ def deprecated_warning_wrapper(obj): by a refactored version), prior to calling obj and returning its value. """ obj_type = type(obj) - # if obj_type not in [type, types.FunctionType, types.BuiltinFunctionType]: - if not isinstance( - obj_type, (type, types.FunctionType, types.BuiltinFunctionType)): + if not callable(obj): raise TypeError("obj must be a class or a function type, got " f"{obj_type}") From 68e38d5d84845b5aeea5387da1eb1f0b2baac02f Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Wed, 27 Jul 2022 10:04:42 -0700 Subject: [PATCH 82/90] remove cmake from the ci conda env --- conda/recipes/cugraph/meta.yaml | 1 - conda/recipes/pylibcugraph/meta.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/conda/recipes/cugraph/meta.yaml b/conda/recipes/cugraph/meta.yaml index 14cc3d28774..022618fa22a 100644 --- a/conda/recipes/cugraph/meta.yaml +++ b/conda/recipes/cugraph/meta.yaml @@ -33,7 +33,6 @@ requirements: host: - python x.x - cython>=0.29,<0.30 - - cmake>=3.20.1,!=3.23.0 - scikit-build>=0.13.1 - libcugraph={{ version }} - libraft-headers {{ minor_version }} diff --git a/conda/recipes/pylibcugraph/meta.yaml b/conda/recipes/pylibcugraph/meta.yaml index 2980f7282f8..4a2a178516a 100644 --- a/conda/recipes/pylibcugraph/meta.yaml +++ b/conda/recipes/pylibcugraph/meta.yaml @@ -33,7 +33,6 @@ requirements: host: - python x.x - cython>=0.29,<0.30 - - cmake>=3.20.1,!=3.23.0 - scikit-build>=0.13.1 - libcugraph={{ version }} - ucx-py {{ ucx_py_version }} From 759a6e58eebb94e19090feafed2f0e0f0f7bd91a Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Thu, 28 Jul 2022 05:01:33 -0700 Subject: [PATCH 83/90] remove 'tool black' from cugraph --- python/cugraph/pyproject.toml | 5 ----- python/pylibcugraph/pyproject.toml | 5 ----- 2 files changed, 10 deletions(-) diff --git a/python/cugraph/pyproject.toml b/python/cugraph/pyproject.toml index 78172f3e34b..ac4538c41f7 100644 --- a/python/cugraph/pyproject.toml +++ b/python/cugraph/pyproject.toml @@ -10,8 +10,3 @@ requires = [ "cmake>=3.20.1,!=3.23.0", "ninja", ] - -[tool.black] -line-length = 79 -target-version = ["py36"] -include = '\.py?$' diff --git a/python/pylibcugraph/pyproject.toml b/python/pylibcugraph/pyproject.toml index 78172f3e34b..ac4538c41f7 100644 --- a/python/pylibcugraph/pyproject.toml +++ b/python/pylibcugraph/pyproject.toml @@ -10,8 +10,3 @@ requires = [ "cmake>=3.20.1,!=3.23.0", "ninja", ] - -[tool.black] -line-length = 79 -target-version = ["py36"] -include = '\.py?$' From d30b0510d766c7e0ea7167127ef2504043cba242 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Thu, 28 Jul 2022 05:24:27 -0700 Subject: [PATCH 84/90] update setup file --- python/cugraph/setup.py | 6 +----- python/pylibcugraph/setup.py | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/python/cugraph/setup.py b/python/cugraph/setup.py index ca8668014f1..78f5bfe6b97 100644 --- a/python/cugraph/setup.py +++ b/python/cugraph/setup.py @@ -19,8 +19,6 @@ from setuputils import get_environment_option -from skbuild.command.build_ext import build_ext - import versioneer @@ -67,10 +65,8 @@ def run(self): os.system('find . -name "*.cpython*.so" -type f -delete') -cmdclass = dict() -cmdclass.update(versioneer.get_cmdclass()) +cmdclass = versioneer.get_cmdclass() cmdclass["clean"] = CleanCommand -cmdclass["build_ext"] = build_ext PACKAGE_DATA = { key: ["*.pxd"] for key in find_packages(include=["cugraph*"])} diff --git a/python/pylibcugraph/setup.py b/python/pylibcugraph/setup.py index 8a804055533..0c3f86f013a 100644 --- a/python/pylibcugraph/setup.py +++ b/python/pylibcugraph/setup.py @@ -17,8 +17,6 @@ from setuptools import find_packages, Command from skbuild import setup -from skbuild.command.build_ext import build_ext - from setuputils import get_environment_option import versioneer @@ -64,10 +62,8 @@ def run(self): os.system('find . -name "*.cpython*.so" -type f -delete') os.system('rm -rf _skbuild') - -cmdclass = dict() +cmdclass = versioneer.get_cmdclass() cmdclass.update(versioneer.get_cmdclass()) -cmdclass["build_ext"] = build_ext cmdclass["clean"] = CleanCommand setup(name='pylibcugraph', From bfd3d87e1172041d22cb9a48191edeef86135a09 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Thu, 28 Jul 2022 05:44:43 -0700 Subject: [PATCH 85/90] update RPATH in the CMake lists --- python/cugraph/cugraph/dask/centrality/CMakeLists.txt | 2 +- python/cugraph/cugraph/dask/comms/CMakeLists.txt | 2 +- python/cugraph/cugraph/dask/community/CMakeLists.txt | 2 +- python/cugraph/cugraph/dask/components/CMakeLists.txt | 2 +- python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt | 2 +- python/cugraph/cugraph/dask/structure/CMakeLists.txt | 2 +- python/cugraph/cugraph/utilities/CMakeLists.txt | 5 ----- python/cugraph/setup.py | 2 +- python/pylibcugraph/pylibcugraph/CMakeLists.txt | 4 ++++ python/pylibcugraph/pylibcugraph/raft/common/CMakeLists.txt | 2 +- 10 files changed, 12 insertions(+), 13 deletions(-) diff --git a/python/cugraph/cugraph/dask/centrality/CMakeLists.txt b/python/cugraph/cugraph/dask/centrality/CMakeLists.txt index 1fb434eeee9..035e93f33c0 100644 --- a/python/cugraph/cugraph/dask/centrality/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/centrality/CMakeLists.txt @@ -21,5 +21,5 @@ rapids_cython_create_modules( ) foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") endforeach() diff --git a/python/cugraph/cugraph/dask/comms/CMakeLists.txt b/python/cugraph/cugraph/dask/comms/CMakeLists.txt index f9fe538f1bd..2a287abed6a 100644 --- a/python/cugraph/cugraph/dask/comms/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/comms/CMakeLists.txt @@ -21,5 +21,5 @@ rapids_cython_create_modules( ) foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") endforeach() diff --git a/python/cugraph/cugraph/dask/community/CMakeLists.txt b/python/cugraph/cugraph/dask/community/CMakeLists.txt index 2a1f12078d3..be33135abfa 100644 --- a/python/cugraph/cugraph/dask/community/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/community/CMakeLists.txt @@ -21,5 +21,5 @@ rapids_cython_create_modules( ) foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") endforeach() diff --git a/python/cugraph/cugraph/dask/components/CMakeLists.txt b/python/cugraph/cugraph/dask/components/CMakeLists.txt index 78fc7e9e1c7..36ef1e216a2 100644 --- a/python/cugraph/cugraph/dask/components/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/components/CMakeLists.txt @@ -21,5 +21,5 @@ rapids_cython_create_modules( ) foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") endforeach() diff --git a/python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt b/python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt index cc4fa264101..b204a6b6927 100644 --- a/python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/link_analysis/CMakeLists.txt @@ -21,5 +21,5 @@ rapids_cython_create_modules( ) foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") endforeach() diff --git a/python/cugraph/cugraph/dask/structure/CMakeLists.txt b/python/cugraph/cugraph/dask/structure/CMakeLists.txt index d1c9bdc2620..afc597cb5d6 100644 --- a/python/cugraph/cugraph/dask/structure/CMakeLists.txt +++ b/python/cugraph/cugraph/dask/structure/CMakeLists.txt @@ -21,5 +21,5 @@ rapids_cython_create_modules( ) foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") endforeach() diff --git a/python/cugraph/cugraph/utilities/CMakeLists.txt b/python/cugraph/cugraph/utilities/CMakeLists.txt index 362ceaecf1a..b4e5a7195ee 100644 --- a/python/cugraph/cugraph/utilities/CMakeLists.txt +++ b/python/cugraph/cugraph/utilities/CMakeLists.txt @@ -20,11 +20,6 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" MODULE_PREFIX utilities_ ) -set(targets_using_numpy utilities_path_retrieval_wrapper) -foreach(target IN LISTS targets_using_numpy) - target_include_directories(${target} PRIVATE "${Python_NumPy_INCLUDE_DIRS}") -endforeach() - foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") endforeach() diff --git a/python/cugraph/setup.py b/python/cugraph/setup.py index 78f5bfe6b97..2743f9178dc 100644 --- a/python/cugraph/setup.py +++ b/python/cugraph/setup.py @@ -63,7 +63,7 @@ def run(self): os.system('rm -rf *.egg-info') os.system('find . -name "*.cpp" -type f -delete') os.system('find . -name "*.cpython*.so" -type f -delete') - + os.system('rm -rf _skbuild') cmdclass = versioneer.get_cmdclass() cmdclass["clean"] = CleanCommand diff --git a/python/pylibcugraph/pylibcugraph/CMakeLists.txt b/python/pylibcugraph/pylibcugraph/CMakeLists.txt index 02e8b33f8ea..ffef4a049b9 100644 --- a/python/pylibcugraph/pylibcugraph/CMakeLists.txt +++ b/python/pylibcugraph/pylibcugraph/CMakeLists.txt @@ -36,3 +36,7 @@ rapids_cython_create_modules( SOURCE_FILES "${cython_sources}" LINKED_LIBRARIES ${linked_libraries} ) + +foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/library") +endforeach() \ No newline at end of file diff --git a/python/pylibcugraph/pylibcugraph/raft/common/CMakeLists.txt b/python/pylibcugraph/pylibcugraph/raft/common/CMakeLists.txt index 596f7448873..18d5e59c664 100644 --- a/python/pylibcugraph/pylibcugraph/raft/common/CMakeLists.txt +++ b/python/pylibcugraph/pylibcugraph/raft/common/CMakeLists.txt @@ -25,5 +25,5 @@ rapids_cython_create_modules( ) foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../library") + set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../../library") endforeach() From bdc936fd0ff2e65083ffb4792e4e542433644aff Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Thu, 28 Jul 2022 05:56:24 -0700 Subject: [PATCH 86/90] update script to fetch the latest rapids cmake --- ci/release/update-version.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index c2062a170bd..9aec4bd7a25 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -39,6 +39,9 @@ function sed_runner() { sed -i.bak ''"$1"'' $2 && rm -f ${2}.bak } +# rapids-cmake version +sed_runner 's/'"branch-.*\/RAPIDS.cmake"'/'"branch-${NEXT_SHORT_TAG}\/RAPIDS.cmake"'/g' fetch_rapids.cmake + # CMakeLists update sed_runner 's/'"CUGRAPH VERSION .* LANGUAGES C CXX CUDA)"'/'"CUGRAPH VERSION ${NEXT_FULL_TAG} LANGUAGES C CXX CUDA)"'/g' cpp/CMakeLists.txt sed_runner 's|'"branch-.*/RAPIDS.cmake"'|'"branch-${NEXT_SHORT_TAG}/RAPIDS.cmake"'|g' cpp/CMakeLists.txt From 66df884f168eba369848c77e609e05cd7783e1f3 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Thu, 28 Jul 2022 05:59:56 -0700 Subject: [PATCH 87/90] fix style --- python/cugraph/setup.py | 1 + python/pylibcugraph/setup.py | 1 + 2 files changed, 2 insertions(+) diff --git a/python/cugraph/setup.py b/python/cugraph/setup.py index 2743f9178dc..ec50090cd43 100644 --- a/python/cugraph/setup.py +++ b/python/cugraph/setup.py @@ -65,6 +65,7 @@ def run(self): os.system('find . -name "*.cpython*.so" -type f -delete') os.system('rm -rf _skbuild') + cmdclass = versioneer.get_cmdclass() cmdclass["clean"] = CleanCommand PACKAGE_DATA = { diff --git a/python/pylibcugraph/setup.py b/python/pylibcugraph/setup.py index 0c3f86f013a..8ea4337407b 100644 --- a/python/pylibcugraph/setup.py +++ b/python/pylibcugraph/setup.py @@ -62,6 +62,7 @@ def run(self): os.system('find . -name "*.cpython*.so" -type f -delete') os.system('rm -rf _skbuild') + cmdclass = versioneer.get_cmdclass() cmdclass.update(versioneer.get_cmdclass()) cmdclass["clean"] = CleanCommand From 3413fdb993ce3baaf4c8e9ca7bc6348007e6557f Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Thu, 28 Jul 2022 08:09:41 -0700 Subject: [PATCH 88/90] disable rapids cmake version bump --- ci/release/update-version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index 9aec4bd7a25..50314141864 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -40,7 +40,7 @@ function sed_runner() { } # rapids-cmake version -sed_runner 's/'"branch-.*\/RAPIDS.cmake"'/'"branch-${NEXT_SHORT_TAG}\/RAPIDS.cmake"'/g' fetch_rapids.cmake +# sed_runner 's/'"branch-.*\/RAPIDS.cmake"'/'"branch-${NEXT_SHORT_TAG}\/RAPIDS.cmake"'/g' fetch_rapids.cmake # CMakeLists update sed_runner 's/'"CUGRAPH VERSION .* LANGUAGES C CXX CUDA)"'/'"CUGRAPH VERSION ${NEXT_FULL_TAG} LANGUAGES C CXX CUDA)"'/g' cpp/CMakeLists.txt From fea0bfba176edf816fcbc25210e8fb6fe62cfd63 Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Thu, 28 Jul 2022 11:20:03 -0700 Subject: [PATCH 89/90] re-enable rapids cmake version bump --- ci/release/update-version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index 50314141864..9aec4bd7a25 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -40,7 +40,7 @@ function sed_runner() { } # rapids-cmake version -# sed_runner 's/'"branch-.*\/RAPIDS.cmake"'/'"branch-${NEXT_SHORT_TAG}\/RAPIDS.cmake"'/g' fetch_rapids.cmake +sed_runner 's/'"branch-.*\/RAPIDS.cmake"'/'"branch-${NEXT_SHORT_TAG}\/RAPIDS.cmake"'/g' fetch_rapids.cmake # CMakeLists update sed_runner 's/'"CUGRAPH VERSION .* LANGUAGES C CXX CUDA)"'/'"CUGRAPH VERSION ${NEXT_FULL_TAG} LANGUAGES C CXX CUDA)"'/g' cpp/CMakeLists.txt From edf35f7279263d3771093ef422c59cead84a8aeb Mon Sep 17 00:00:00 2001 From: Joseph Nke Date: Thu, 28 Jul 2022 11:33:06 -0700 Subject: [PATCH 90/90] add end of line --- python/pylibcugraph/pylibcugraph/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pylibcugraph/pylibcugraph/CMakeLists.txt b/python/pylibcugraph/pylibcugraph/CMakeLists.txt index ffef4a049b9..c5ae32a0b2a 100644 --- a/python/pylibcugraph/pylibcugraph/CMakeLists.txt +++ b/python/pylibcugraph/pylibcugraph/CMakeLists.txt @@ -39,4 +39,4 @@ rapids_cython_create_modules( foreach(cython_module IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN;\$ORIGIN/library") -endforeach() \ No newline at end of file +endforeach()