From 77ce584176525d84635b03c3034c544e68dfc7e9 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Fri, 17 Mar 2023 16:41:36 -0500 Subject: [PATCH] Update conda recipes for CUDA 12 (nvidia channel). --- conda/recipes/libraft/build_libraft.sh | 1 + .../recipes/libraft/build_libraft_headers.sh | 1 + conda/recipes/libraft/build_libraft_tests.sh | 1 + conda/recipes/libraft/conda_build_config.yaml | 59 ++++++++++--- conda/recipes/libraft/meta.yaml | 86 ++++++++++++++++++- 5 files changed, 134 insertions(+), 14 deletions(-) diff --git a/conda/recipes/libraft/build_libraft.sh b/conda/recipes/libraft/build_libraft.sh index 237e47eb26..d5c3b4c8e0 100644 --- a/conda/recipes/libraft/build_libraft.sh +++ b/conda/recipes/libraft/build_libraft.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash # Copyright (c) 2022-2023, NVIDIA CORPORATION. +export NVCC_PREPEND_FLAGS="${NVCC_PREPEND_FLAGS} -ccbin ${CXX}" # Needed for CUDA 12 nvidia channel compilers ./build.sh libraft --allgpuarch --compile-lib --no-nvtx diff --git a/conda/recipes/libraft/build_libraft_headers.sh b/conda/recipes/libraft/build_libraft_headers.sh index cc3b840e43..e730e39955 100644 --- a/conda/recipes/libraft/build_libraft_headers.sh +++ b/conda/recipes/libraft/build_libraft_headers.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash # Copyright (c) 2022-2023, NVIDIA CORPORATION. +export NVCC_PREPEND_FLAGS="${NVCC_PREPEND_FLAGS} -ccbin ${CXX}" # Needed for CUDA 12 nvidia channel compilers ./build.sh libraft --allgpuarch --no-nvtx diff --git a/conda/recipes/libraft/build_libraft_tests.sh b/conda/recipes/libraft/build_libraft_tests.sh index aa2c1b3e89..4f3b21f78a 100644 --- a/conda/recipes/libraft/build_libraft_tests.sh +++ b/conda/recipes/libraft/build_libraft_tests.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash # Copyright (c) 2022-2023, NVIDIA CORPORATION. +export NVCC_PREPEND_FLAGS="${NVCC_PREPEND_FLAGS} -ccbin ${CXX}" # Needed for CUDA 12 nvidia channel compilers ./build.sh tests bench --allgpuarch --no-nvtx cmake --install cpp/build --component testing diff --git a/conda/recipes/libraft/conda_build_config.yaml b/conda/recipes/libraft/conda_build_config.yaml index e1079f4db8..6e5cb6c990 100644 --- a/conda/recipes/libraft/conda_build_config.yaml +++ b/conda/recipes/libraft/conda_build_config.yaml @@ -5,6 +5,9 @@ cxx_compiler_version: - 11 cuda_compiler: + - cuda-nvcc + +cuda11_compiler: - nvcc sysroot_version: @@ -23,36 +26,72 @@ gtest_version: # package. The "*_host_*" version specifiers correspond to `11.8` packages and the # "*_run_*" version specifiers correspond to `11.x` packages. -libcublas_host_version: +cuda11_libcublas_host_version: - "=11.11.3.6" -libcublas_run_version: +cuda11_libcublas_run_version: - ">=11.5.2.43,<12.0.0" -libcurand_host_version: +cuda11_libcurand_host_version: - "=10.3.0.86" -libcurand_run_version: +cuda11_libcurand_run_version: - ">=10.2.5.43,<10.3.1" -libcusolver_host_version: +cuda11_libcusolver_host_version: - "=11.4.1.48" -libcusolver_run_version: +cuda11_libcusolver_run_version: - ">=11.2.0.43,<11.4.2" -libcusparse_host_version: +cuda11_libcusparse_host_version: - "=11.7.5.86" -libcusparse_run_version: +cuda11_libcusparse_run_version: - ">=11.6.0.43,<12.0.0" # `cuda-profiler-api` only has `11.8.0` and `12.0.0` packages for all # architectures. The "*_host_*" version specifiers correspond to `11.8` packages and the # "*_run_*" version specifiers correspond to `11.x` packages. -cuda_profiler_api_host_version: +cuda11_cuda_profiler_api_host_version: - "=11.8.86" -cuda_profiler_api_run_version: +cuda11_cuda_profiler_api_run_version: - ">=11.4.240,<12" + + +# CUDA 12 pinnings +# TODO: Update to conda-forge CUDA 12 packaging. +# Then we can remove pinnings and use cuda-version=12.0 at build time and +# cuda-version >=12.0,<13 at runtime. + +libcublas_host_version: + - "=12.0.1.189,<13" + +libcublas_run_version: + - ">=12.0.1.189" + +libcurand_host_version: + - "=10.3.1.50" + +libcurand_run_version: + - ">=10.3.1.50" + +libcusolver_host_version: + - "=11.4.2.57" + +libcusolver_run_version: + - ">=11.4.2.57" + +libcusparse_host_version: + - "=12.0.0.76" + +libcusparse_run_version: + - ">=12.0.0.76" + +cuda_profiler_api_host_version: + - "=12.0.76" + +cuda_profiler_api_run_version: + - ">=12.0.76" diff --git a/conda/recipes/libraft/meta.yaml b/conda/recipes/libraft/meta.yaml index 2a724672ab..a7877b2479 100644 --- a/conda/recipes/libraft/meta.yaml +++ b/conda/recipes/libraft/meta.yaml @@ -38,19 +38,39 @@ outputs: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ date_string }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} ignore_run_exports_from: + {% if cuda_major == "11" %} + - {{ compiler('cuda11') }} + {% else %} - {{ compiler('cuda') }} + {% endif %} - librmm requirements: build: - {{ compiler('c') }} - {{ compiler('cxx') }} + {% if cuda_major == "11" %} + - {{ compiler('cuda11') }} {{ cuda_version }} + {% else %} - {{ compiler('cuda') }} {{ cuda_version }} + {% endif %} - cmake {{ cmake_version }} - ninja - sysroot_{{ target_platform }} {{ sysroot_version }} host: - - cuda-profiler-api {{ cuda_profiler_api_host_version }} + {% if cuda_major == "11" %} + - cuda-profiler-api {{ cuda11_cuda_profiler_api_host_version }} - cudatoolkit ={{ cuda_version }} + - libcublas {{ cuda11_libcublas_host_version }} + - libcublas-dev {{ cuda11_libcublas_host_version }} + - libcurand {{ cuda11_libcurand_host_version }} + - libcurand-dev {{ cuda11_libcurand_host_version }} + - libcusolver {{ cuda11_libcusolver_host_version }} + - libcusolver-dev {{ cuda11_libcusolver_host_version }} + - libcusparse {{ cuda11_libcusparse_host_version }} + - libcusparse-dev {{ cuda11_libcusparse_host_version }} + {% else %} + # TODO: cuda-version + - cuda-profiler-api {{ cuda_profiler_api_host_version }} - libcublas {{ libcublas_host_version }} - libcublas-dev {{ libcublas_host_version }} - libcurand {{ libcurand_host_version }} @@ -59,9 +79,22 @@ outputs: - libcusolver-dev {{ libcusolver_host_version }} - libcusparse {{ libcusparse_host_version }} - libcusparse-dev {{ libcusparse_host_version }} + {% endif %} - librmm ={{ minor_version }} run: + {% if cuda_major == "11" %} - {{ pin_compatible('cudatoolkit', max_pin='x', min_pin='x') }} + - cuda-profiler-api {{ cuda11_cuda_profiler_api_run_version }} + - libcublas {{ cuda11_libcublas_run_version }} + - libcublas-dev {{ cuda11_libcublas_run_version }} + - libcurand {{ cuda11_libcurand_run_version }} + - libcurand-dev {{ cuda11_libcurand_run_version }} + - libcusolver {{ cuda11_libcusolver_run_version }} + - libcusolver-dev {{ cuda11_libcusolver_run_version }} + - libcusparse {{ cuda11_libcusparse_run_version }} + - libcusparse-dev {{ cuda11_libcusparse_run_version }} + {% else %} + # TODO: cuda-version - cuda-profiler-api {{ cuda_profiler_api_run_version }} - libcublas {{ libcublas_run_version }} - libcublas-dev {{ libcublas_run_version }} @@ -71,6 +104,7 @@ outputs: - libcusolver-dev {{ libcusolver_run_version }} - libcusparse {{ libcusparse_run_version }} - libcusparse-dev {{ libcusparse_run_version }} + {% endif %} - librmm ={{ minor_version }} about: home: https://rapids.ai/ @@ -84,17 +118,38 @@ outputs: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ date_string }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} ignore_run_exports_from: + {% if cuda_major == "11" %} + - {{ compiler('cuda11') }} + {% else %} - {{ compiler('cuda') }} + {% endif %} requirements: build: - {{ compiler('c') }} - - {{ compiler('cuda') }} {{ cuda_version }} - {{ compiler('cxx') }} + {% if cuda_major == "11" %} + - {{ compiler('cuda11') }} {{ cuda_version }} + {% else %} + - {{ compiler('cuda') }} {{ cuda_version }} + {% endif %} - cmake {{ cmake_version }} - ninja - sysroot_{{ target_platform }} {{ sysroot_version }} host: - {{ pin_subpackage('libraft-headers', exact=True) }} + {% if cuda_major == "11" %} + - cuda-profiler-api {{ cuda11_cuda_profiler_api_host_version }} + - cudatoolkit ={{ cuda_version }} + - libcublas {{ cuda11_libcublas_host_version }} + - libcublas-dev {{ cuda11_libcublas_host_version }} + - libcurand {{ cuda11_libcurand_host_version }} + - libcurand-dev {{ cuda11_libcurand_host_version }} + - libcusolver {{ cuda11_libcusolver_host_version }} + - libcusolver-dev {{ cuda11_libcusolver_host_version }} + - libcusparse {{ cuda11_libcusparse_host_version }} + - libcusparse-dev {{ cuda11_libcusparse_host_version }} + {% else %} + # TODO: cuda-version - cuda-profiler-api {{ cuda_profiler_api_host_version }} - libcublas {{ libcublas_host_version }} - libcublas-dev {{ libcublas_host_version }} @@ -104,6 +159,7 @@ outputs: - libcusolver-dev {{ libcusolver_host_version }} - libcusparse {{ libcusparse_host_version }} - libcusparse-dev {{ libcusparse_host_version }} + {% endif %} run: - {{ pin_subpackage('libraft-headers', exact=True) }} about: @@ -118,21 +174,42 @@ outputs: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ date_string }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} ignore_run_exports_from: + {% if cuda_major == "11" %} + - {{ compiler('cuda11') }} + {% else %} - {{ compiler('cuda') }} + {% endif %} requirements: build: - {{ compiler('c') }} - - {{ compiler('cuda') }} {{ cuda_version }} - {{ compiler('cxx') }} + {% if cuda_major == "11" %} + - {{ compiler('cuda11') }} {{ cuda_version }} + {% else %} + - {{ compiler('cuda') }} {{ cuda_version }} + {% endif %} - cmake {{ cmake_version }} - ninja - sysroot_{{ target_platform }} {{ sysroot_version }} host: - {{ pin_subpackage('libraft', exact=True) }} - {{ pin_subpackage('libraft-headers', exact=True) }} - - cuda-profiler-api {{ cuda_profiler_api_host_version }} - gmock {{ gtest_version }} - gtest {{ gtest_version }} + {% if cuda_major == "11" %} + - cuda-profiler-api {{ cuda11_cuda_profiler_api_host_version }} + - cudatoolkit ={{ cuda_version }} + - libcublas {{ cuda11_libcublas_host_version }} + - libcublas-dev {{ cuda11_libcublas_host_version }} + - libcurand {{ cuda11_libcurand_host_version }} + - libcurand-dev {{ cuda11_libcurand_host_version }} + - libcusolver {{ cuda11_libcusolver_host_version }} + - libcusolver-dev {{ cuda11_libcusolver_host_version }} + - libcusparse {{ cuda11_libcusparse_host_version }} + - libcusparse-dev {{ cuda11_libcusparse_host_version }} + {% else %} + # TODO: cuda-version + - cuda-profiler-api {{ cuda_profiler_api_host_version }} - libcublas {{ libcublas_host_version }} - libcublas-dev {{ libcublas_host_version }} - libcurand {{ libcurand_host_version }} @@ -141,6 +218,7 @@ outputs: - libcusolver-dev {{ libcusolver_host_version }} - libcusparse {{ libcusparse_host_version }} - libcusparse-dev {{ libcusparse_host_version }} + {% endif %} run: - {{ pin_subpackage('libraft', exact=True) }} - {{ pin_subpackage('libraft-headers', exact=True) }}