From a0fed4e552e669e25f644f3362b7bc7e1e928360 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Fri, 17 Jan 2025 14:04:50 -0600 Subject: [PATCH] Use GCC 13 in CUDA 12 conda builds. (#811) conda-forge is using GCC 13 for CUDA 12 builds. This PR updates CUDA 12 conda builds to use GCC 13, for alignment. These PRs should be merged in a specific order, see https://github.com/rapidsai/build-planning/issues/129 for details. Authors: - Bradley Dice (https://github.com/bdice) - https://github.com/jakirkham Approvers: - James Lamb (https://github.com/jameslamb) - https://github.com/jakirkham URL: https://github.com/rapidsai/cucim/pull/811 --- conda/environments/all_cuda-118_arch-x86_64.yaml | 2 +- conda/environments/all_cuda-125_arch-x86_64.yaml | 4 ++-- conda/recipes/cucim/conda_build_config.yaml | 14 +++++++------- conda/recipes/cucim/meta.yaml | 6 ++---- conda/recipes/libcucim/conda_build_config.yaml | 14 +++++++------- conda/recipes/libcucim/meta.yaml | 6 ++---- cpp/src/concurrent/threadpool.cpp | 5 ++--- dependencies.yaml | 16 ++++++++++++---- 8 files changed, 35 insertions(+), 32 deletions(-) diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index c66bda1c6..8a83a3cbe 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -43,7 +43,7 @@ dependencies: - scikit-image>=0.19.0,<0.26.0a0 - scipy>=1.11.2 - sphinx<6 -- sysroot_linux-64==2.17 +- sysroot_linux-64==2.28 - tifffile>=2022.8.12 - yasm - pip: diff --git a/conda/environments/all_cuda-125_arch-x86_64.yaml b/conda/environments/all_cuda-125_arch-x86_64.yaml index dedab4a64..529f39ba3 100644 --- a/conda/environments/all_cuda-125_arch-x86_64.yaml +++ b/conda/environments/all_cuda-125_arch-x86_64.yaml @@ -14,7 +14,7 @@ dependencies: - cuda-version=12.5 - cupy>=12.0.0 - cxx-compiler -- gcc_linux-64=11.* +- gcc_linux-64=13.* - imagecodecs>=2021.6.8 - ipython - lazy-loader>=0.4 @@ -42,7 +42,7 @@ dependencies: - scikit-image>=0.19.0,<0.26.0a0 - scipy>=1.11.2 - sphinx<6 -- sysroot_linux-64==2.17 +- sysroot_linux-64==2.28 - tifffile>=2022.8.12 - yasm - pip: diff --git a/conda/recipes/cucim/conda_build_config.yaml b/conda/recipes/cucim/conda_build_config.yaml index 001878ff2..83f5ebcb1 100644 --- a/conda/recipes/cucim/conda_build_config.yaml +++ b/conda/recipes/cucim/conda_build_config.yaml @@ -1,20 +1,20 @@ c_compiler_version: - - 11 + - 13 # [not os.environ.get("RAPIDS_CUDA_VERSION", "").startswith("11")] + - 11 # [os.environ.get("RAPIDS_CUDA_VERSION", "").startswith("11")] cxx_compiler_version: - - 11 + - 13 # [not os.environ.get("RAPIDS_CUDA_VERSION", "").startswith("11")] + - 11 # [os.environ.get("RAPIDS_CUDA_VERSION", "").startswith("11")] cuda_compiler: - - cuda-nvcc - -cuda11_compiler: - - nvcc + - cuda-nvcc # [not os.environ.get("RAPIDS_CUDA_VERSION", "").startswith("11")] + - nvcc # [os.environ.get("RAPIDS_CUDA_VERSION", "").startswith("11")] c_stdlib: - sysroot c_stdlib_version: - - "2.17" + - "2.28" cmake_version: - ">=3.26.4,!=3.30.0" diff --git a/conda/recipes/cucim/meta.yaml b/conda/recipes/cucim/meta.yaml index 7bd205bb6..6ac669a8f 100644 --- a/conda/recipes/cucim/meta.yaml +++ b/conda/recipes/cucim/meta.yaml @@ -18,10 +18,8 @@ build: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_py{{ py_version }}_{{ date_string }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} ignore_run_exports_from: - {% if cuda_major == "11" %} - - {{ compiler('cuda11') }} - {% else %} - {{ compiler('cuda') }} + {% if cuda_major != "11" %} - cuda-cudart-dev {% endif %} script_env: @@ -46,7 +44,7 @@ requirements: - {{ compiler("c") }} - {{ compiler("cxx") }} {% if cuda_major == "11" %} - - {{ compiler('cuda11') }} ={{ cuda_version }} + - {{ compiler('cuda') }} ={{ cuda_version }} {% else %} - {{ compiler('cuda') }} {% endif %} diff --git a/conda/recipes/libcucim/conda_build_config.yaml b/conda/recipes/libcucim/conda_build_config.yaml index ff870eb5c..246946266 100644 --- a/conda/recipes/libcucim/conda_build_config.yaml +++ b/conda/recipes/libcucim/conda_build_config.yaml @@ -1,20 +1,20 @@ c_compiler_version: - - 11 + - 13 # [not os.environ.get("RAPIDS_CUDA_VERSION", "").startswith("11")] + - 11 # [os.environ.get("RAPIDS_CUDA_VERSION", "").startswith("11")] cxx_compiler_version: - - 11 + - 13 # [not os.environ.get("RAPIDS_CUDA_VERSION", "").startswith("11")] + - 11 # [os.environ.get("RAPIDS_CUDA_VERSION", "").startswith("11")] cuda_compiler: - - cuda-nvcc - -cuda11_compiler: - - nvcc + - cuda-nvcc # [not os.environ.get("RAPIDS_CUDA_VERSION", "").startswith("11")] + - nvcc # [os.environ.get("RAPIDS_CUDA_VERSION", "").startswith("11")] c_stdlib: - sysroot c_stdlib_version: - - "2.17" + - "2.28" cmake_version: - ">=3.26.4,!=3.30.0" diff --git a/conda/recipes/libcucim/meta.yaml b/conda/recipes/libcucim/meta.yaml index 7ab230806..75b30f7a9 100644 --- a/conda/recipes/libcucim/meta.yaml +++ b/conda/recipes/libcucim/meta.yaml @@ -19,10 +19,8 @@ build: ignore_run_exports: - openslide ignore_run_exports_from: - {% if cuda_major == "11" %} - - {{ compiler('cuda11') }} - {% else %} - {{ compiler('cuda') }} + {% if cuda_major != "11" %} - cuda-cudart-dev - libcufile-dev # [linux64] - libnvjpeg-dev @@ -49,7 +47,7 @@ requirements: - {{ compiler("c") }} - {{ compiler("cxx") }} {% if cuda_major == "11" %} - - {{ compiler('cuda11') }} ={{ cuda_version }} + - {{ compiler('cuda') }} ={{ cuda_version }} {% else %} - {{ compiler('cuda') }} {% endif %} diff --git a/cpp/src/concurrent/threadpool.cpp b/cpp/src/concurrent/threadpool.cpp index 595b40aff..f11c94859 100644 --- a/cpp/src/concurrent/threadpool.cpp +++ b/cpp/src/concurrent/threadpool.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, NVIDIA CORPORATION. + * Copyright (c) 2021-2025, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,8 +55,7 @@ ThreadPool::operator bool() const std::future ThreadPool::enqueue(std::function task) { - auto future = executor_->async([task]() { task(); }); - return std::move(future); + return executor_->async([task]() { task(); }); } void ThreadPool::wait() diff --git a/dependencies.yaml b/dependencies.yaml index dd6858e55..1859f0132 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -107,29 +107,37 @@ dependencies: - matrix: arch: x86_64 packages: - - gcc_linux-64=11.* - - sysroot_linux-64==2.17 + - sysroot_linux-64==2.28 - yasm - matrix: arch: aarch64 packages: - - gcc_linux-aarch64=11.* - - sysroot_linux-aarch64==2.17 + - sysroot_linux-aarch64==2.28 - output_types: conda matrices: - matrix: arch: x86_64 cuda: "11.8" packages: + - gcc_linux-64=11.* - nvcc_linux-64=11.8 - matrix: arch: aarch64 cuda: "11.8" packages: + - gcc_linux-aarch64=11.* - nvcc_linux-aarch64=11.8 - matrix: + arch: x86_64 + cuda: "12.*" + packages: + - gcc_linux-64=13.* + - cuda-nvcc + - matrix: + arch: aarch64 cuda: "12.*" packages: + - gcc_linux-aarch64=13.* - cuda-nvcc checks: common: