From 9b1d18922ceef71d3b222886dc74c8fe8e4332ea Mon Sep 17 00:00:00 2001 From: Jordan Jacobelli Date: Mon, 23 May 2022 09:28:14 +0200 Subject: [PATCH] Use conda compilers (#2101) This PR enables the usage of conda compilers to build conda packages. This is required to use `mambabuild` Authors: - Jordan Jacobelli (https://github.com/Ethyling) Approvers: - AJ Schmidt (https://github.com/ajschmidt8) - Rick Ratzel (https://github.com/rlratzel) URL: https://github.com/rapidsai/cugraph/pull/2101 --- conda/recipes/cugraph/conda_build_config.yaml | 11 +++++++++++ conda/recipes/cugraph/meta.yaml | 10 +++++++--- conda/recipes/libcugraph/conda_build_config.yaml | 12 ++++++++++++ conda/recipes/libcugraph/meta.yaml | 13 ++++++++++--- conda/recipes/pylibcugraph/conda_build_config.yaml | 11 +++++++++++ conda/recipes/pylibcugraph/meta.yaml | 10 +++++++--- python/pylibcugraph/setup.py | 2 +- 7 files changed, 59 insertions(+), 10 deletions(-) create mode 100644 conda/recipes/cugraph/conda_build_config.yaml create mode 100644 conda/recipes/pylibcugraph/conda_build_config.yaml diff --git a/conda/recipes/cugraph/conda_build_config.yaml b/conda/recipes/cugraph/conda_build_config.yaml new file mode 100644 index 00000000000..322fe6faacf --- /dev/null +++ b/conda/recipes/cugraph/conda_build_config.yaml @@ -0,0 +1,11 @@ +c_compiler_version: + - 9 + +cxx_compiler_version: + - 9 + +cuda_compiler: + - nvcc + +sysroot_version: + - "2.17" diff --git a/conda/recipes/cugraph/meta.yaml b/conda/recipes/cugraph/meta.yaml index b16e65e519a..b929f7a8f4e 100644 --- a/conda/recipes/cugraph/meta.yaml +++ b/conda/recipes/cugraph/meta.yaml @@ -19,13 +19,17 @@ build: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_py{{ py_version }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} script_env: - - CC - - CXX - - CUDAHOSTCXX - PARALLEL_LEVEL + ignore_run_exports_from: + - {{ compiler('cuda') }} requirements: build: + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - {{ compiler('cuda') }} {{ cuda_version }} + - sysroot_{{ target_platform }} {{ sysroot_version }} + host: - python x.x - cython>=0.29,<0.30 - libcugraph={{ version }} diff --git a/conda/recipes/libcugraph/conda_build_config.yaml b/conda/recipes/libcugraph/conda_build_config.yaml index 203f6f20f7b..cd36b2e5fc3 100644 --- a/conda/recipes/libcugraph/conda_build_config.yaml +++ b/conda/recipes/libcugraph/conda_build_config.yaml @@ -1,3 +1,12 @@ +c_compiler_version: + - 9 + +cxx_compiler_version: + - 9 + +cuda_compiler: + - nvcc + cmake_version: - ">=3.20.1,!=3.23.0" @@ -15,3 +24,6 @@ gtest_version: libcusolver_version: - ">=11.2.1" + +sysroot_version: + - "2.17" diff --git a/conda/recipes/libcugraph/meta.yaml b/conda/recipes/libcugraph/meta.yaml index 9f7b37fec8c..76bed2d0517 100644 --- a/conda/recipes/libcugraph/meta.yaml +++ b/conda/recipes/libcugraph/meta.yaml @@ -16,9 +16,6 @@ source: build: script_env: - - CC - - CXX - - CUDAHOSTCXX - PARALLEL_LEVEL - VERSION_SUFFIX - CMAKE_GENERATOR @@ -34,6 +31,10 @@ build: requirements: build: - cmake {{ cmake_version }} + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - {{ compiler('cuda') }} {{ cuda_version }} + - sysroot_{{ target_platform }} {{ sysroot_version }} host: - doxygen {{ doxygen_version }} - cudatoolkit {{ cuda_version }}.* @@ -54,6 +55,8 @@ outputs: build: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} + ignore_run_exports_from: + - {{ compiler('cuda') }} requirements: build: - cmake {{ cmake_version }} @@ -76,6 +79,8 @@ outputs: build: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} + ignore_run_exports_from: + - {{ compiler('cuda') }} requirements: build: - cmake {{ cmake_version }} @@ -96,6 +101,8 @@ outputs: build: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} + ignore_run_exports_from: + - {{ compiler('cuda') }} requirements: build: - cmake {{ cmake_version }} diff --git a/conda/recipes/pylibcugraph/conda_build_config.yaml b/conda/recipes/pylibcugraph/conda_build_config.yaml new file mode 100644 index 00000000000..322fe6faacf --- /dev/null +++ b/conda/recipes/pylibcugraph/conda_build_config.yaml @@ -0,0 +1,11 @@ +c_compiler_version: + - 9 + +cxx_compiler_version: + - 9 + +cuda_compiler: + - nvcc + +sysroot_version: + - "2.17" diff --git a/conda/recipes/pylibcugraph/meta.yaml b/conda/recipes/pylibcugraph/meta.yaml index 4aa3e249d45..a6dec1d50ba 100644 --- a/conda/recipes/pylibcugraph/meta.yaml +++ b/conda/recipes/pylibcugraph/meta.yaml @@ -19,13 +19,17 @@ build: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_py{{ py_version }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} script_env: - - CC - - CXX - - CUDAHOSTCXX - PARALLEL_LEVEL + ignore_run_exports_from: + - {{ compiler('cuda') }} requirements: build: + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - {{ compiler('cuda') }} {{ cuda_version }} + - sysroot_{{ target_platform }} {{ sysroot_version }} + host: - python x.x - cython>=0.29,<0.30 - libcugraph={{ version }} diff --git a/python/pylibcugraph/setup.py b/python/pylibcugraph/setup.py index 07c82727803..ca6a419faa8 100644 --- a/python/pylibcugraph/setup.py +++ b/python/pylibcugraph/setup.py @@ -122,7 +122,7 @@ def run(self): os.path.join(os.sys.prefix, "lib") ], libraries=['cudart', 'cusparse', 'cusolver', 'cugraph', 'nccl', - 'cugraph_c'], + 'cugraph_c', 'cublas'], language='c++', extra_compile_args=['-std=c++17']) ]