From 2254197debcd89a2f8a616fde7259a0a3fa36807 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Fri, 7 Feb 2025 16:23:20 -0800 Subject: [PATCH 1/9] Add a migrator for CUDA 12.8 --- recipe/migrations/cuda128.yaml | 61 ++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 recipe/migrations/cuda128.yaml diff --git a/recipe/migrations/cuda128.yaml b/recipe/migrations/cuda128.yaml new file mode 100644 index 0000000000..c3b2b1ebdf --- /dev/null +++ b/recipe/migrations/cuda128.yaml @@ -0,0 +1,61 @@ +migrator_ts: 1738229377 +__migrator: + kind: + version + migration_number: + 1 + build_number: + 1 + paused: false + override_cbc_keys: + - cuda_compiler_stub + operation: key_add + check_solvable: false + primary_key: cuda_compiler_version + ordering: + cuda_compiler: + - None + - nvcc + - cuda-nvcc + cuda_compiler_version: + - None + - 11.8 + - 12.4 + - 12.6 + - 12.8 + commit_message: | + Upgrade to CUDA 12.8 + + With CUDA 12.8, the following new architectures are added `sm_100`, `sm_101` and `sm_120`. + To build for these architectures, maintainers will need to add these to list of architectures + that their package builds for. + + ref: https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#new-features + +cuda_compiler: # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - cuda-nvcc # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + +cuda_compiler_version: # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 12.8 # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + +c_compiler_version: # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 13 # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + +cxx_compiler_version: # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 13 # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + +fortran_compiler_version: # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 13 # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + +docker_image: # [os.environ.get("BUILD_PLATFORM", "").startswith("linux-") and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + # CUDA 12 builds on CentOS 7 + - quay.io/condaforge/linux-anvil-x86_64:cos7 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-64" and os.environ.get("DEFAULT_LINUX_VERSION", "alma9") == "cos7"] + - quay.io/condaforge/linux-anvil-aarch64:cos7 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-aarch64" and os.environ.get("DEFAULT_LINUX_VERSION", "alma9") == "cos7"] + + # CUDA 12 builds on AlmaLinux 8 + - quay.io/condaforge/linux-anvil-x86_64:alma8 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-64" and os.environ.get("DEFAULT_LINUX_VERSION", "alma9") in ("alma8", "ubi8")] + - quay.io/condaforge/linux-anvil-aarch64:alma8 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-aarch64" and os.environ.get("DEFAULT_LINUX_VERSION", "alma9") in ("alma8", "ubi8")] + + # CUDA 12 builds on AlmaLinux 9 + - quay.io/condaforge/linux-anvil-x86_64:alma9 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-64" and os.environ.get("DEFAULT_LINUX_VERSION", "alma9") == "alma9"] + - quay.io/condaforge/linux-anvil-aarch64:alma9 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-aarch64" and os.environ.get("DEFAULT_LINUX_VERSION", "alma9") == "alma9"] From 2252dbdd864e5bd9b3ff2ef4e6474c9cb02e112a Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 13 Jun 2025 09:55:57 +1100 Subject: [PATCH 2/9] drop keys in cuda 11.8 migrator that aren't part of zip anymore --- recipe/migrations/cuda128.yaml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/recipe/migrations/cuda128.yaml b/recipe/migrations/cuda128.yaml index c3b2b1ebdf..ea9f1f56d4 100644 --- a/recipe/migrations/cuda128.yaml +++ b/recipe/migrations/cuda128.yaml @@ -32,9 +32,6 @@ __migrator: ref: https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#new-features -cuda_compiler: # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - - cuda-nvcc # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - cuda_compiler_version: # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - 12.8 # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] @@ -46,16 +43,3 @@ cxx_compiler_version: # [((linux and (x86_64 or aarch64)) or win64) and fortran_compiler_version: # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - 13 # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - -docker_image: # [os.environ.get("BUILD_PLATFORM", "").startswith("linux-") and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - # CUDA 12 builds on CentOS 7 - - quay.io/condaforge/linux-anvil-x86_64:cos7 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-64" and os.environ.get("DEFAULT_LINUX_VERSION", "alma9") == "cos7"] - - quay.io/condaforge/linux-anvil-aarch64:cos7 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-aarch64" and os.environ.get("DEFAULT_LINUX_VERSION", "alma9") == "cos7"] - - # CUDA 12 builds on AlmaLinux 8 - - quay.io/condaforge/linux-anvil-x86_64:alma8 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-64" and os.environ.get("DEFAULT_LINUX_VERSION", "alma9") in ("alma8", "ubi8")] - - quay.io/condaforge/linux-anvil-aarch64:alma8 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-aarch64" and os.environ.get("DEFAULT_LINUX_VERSION", "alma9") in ("alma8", "ubi8")] - - # CUDA 12 builds on AlmaLinux 9 - - quay.io/condaforge/linux-anvil-x86_64:alma9 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-64" and os.environ.get("DEFAULT_LINUX_VERSION", "alma9") == "alma9"] - - quay.io/condaforge/linux-anvil-aarch64:alma9 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-aarch64" and os.environ.get("DEFAULT_LINUX_VERSION", "alma9") == "alma9"] From 31cbc591ab65dcde2239dccd207d1c5fde40c525 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 13 Jun 2025 09:56:34 +1100 Subject: [PATCH 3/9] use CUDA 12.9 --- recipe/migrations/{cuda128.yaml => cuda129.yaml} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename recipe/migrations/{cuda128.yaml => cuda129.yaml} (91%) diff --git a/recipe/migrations/cuda128.yaml b/recipe/migrations/cuda129.yaml similarity index 91% rename from recipe/migrations/cuda128.yaml rename to recipe/migrations/cuda129.yaml index ea9f1f56d4..fd7b49d2bc 100644 --- a/recipe/migrations/cuda128.yaml +++ b/recipe/migrations/cuda129.yaml @@ -22,18 +22,18 @@ __migrator: - 11.8 - 12.4 - 12.6 - - 12.8 + - 12.9 commit_message: | - Upgrade to CUDA 12.8 + Upgrade to CUDA 12.9 - With CUDA 12.8, the following new architectures are added `sm_100`, `sm_101` and `sm_120`. + With CUDA 12.9, the following new architectures are added `sm_100`, `sm_101` and `sm_120`. To build for these architectures, maintainers will need to add these to list of architectures that their package builds for. ref: https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#new-features cuda_compiler_version: # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - - 12.8 # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 12.9 # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] c_compiler_version: # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - 13 # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] From 0390e040b36bb3d809349924dc24b9e0a48290e5 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 13 Jun 2025 09:59:44 +1100 Subject: [PATCH 4/9] remove `operation: key_add` --- recipe/migrations/cuda129.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/recipe/migrations/cuda129.yaml b/recipe/migrations/cuda129.yaml index fd7b49d2bc..0efbf0cd66 100644 --- a/recipe/migrations/cuda129.yaml +++ b/recipe/migrations/cuda129.yaml @@ -9,7 +9,6 @@ __migrator: paused: false override_cbc_keys: - cuda_compiler_stub - operation: key_add check_solvable: false primary_key: cuda_compiler_version ordering: From 57df0d78dcd95424dce01a8c4a25931cd35d8963 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 13 Jun 2025 15:15:11 +1100 Subject: [PATCH 5/9] fix ordering to keep CPU builds --- recipe/migrations/cuda129.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/recipe/migrations/cuda129.yaml b/recipe/migrations/cuda129.yaml index 0efbf0cd66..9141cc0a7f 100644 --- a/recipe/migrations/cuda129.yaml +++ b/recipe/migrations/cuda129.yaml @@ -12,15 +12,11 @@ __migrator: check_solvable: false primary_key: cuda_compiler_version ordering: - cuda_compiler: - - None - - nvcc - - cuda-nvcc cuda_compiler_version: - - None - 11.8 - 12.4 - 12.6 + - None - 12.9 commit_message: | Upgrade to CUDA 12.9 From 6bd655ad5afdc304f2a46d8029b237d48cb4e440 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 13 Jun 2025 15:41:50 +1100 Subject: [PATCH 6/9] do not set {c,cxx,fortran}_compiler_version on windows --- recipe/migrations/cuda129.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/recipe/migrations/cuda129.yaml b/recipe/migrations/cuda129.yaml index 9141cc0a7f..9396d2c309 100644 --- a/recipe/migrations/cuda129.yaml +++ b/recipe/migrations/cuda129.yaml @@ -30,11 +30,11 @@ __migrator: cuda_compiler_version: # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - 12.9 # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] -c_compiler_version: # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - - 13 # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] +c_compiler_version: # [(linux and (x86_64 or aarch64)) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 13 # [(linux and (x86_64 or aarch64)) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] -cxx_compiler_version: # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - - 13 # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] +cxx_compiler_version: # [(linux and (x86_64 or aarch64)) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 13 # [(linux and (x86_64 or aarch64)) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] -fortran_compiler_version: # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - - 13 # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] +fortran_compiler_version: # [(linux and (x86_64 or aarch64)) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 13 # [(linux and (x86_64 or aarch64)) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] From 859c0ea7018979749d774a309b4a195395ef4730 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 13 Jun 2025 19:05:37 +1100 Subject: [PATCH 7/9] make cuda 12.9 migrator compatible with cuda11.8 opt-in --- recipe/migrations/cuda129.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/recipe/migrations/cuda129.yaml b/recipe/migrations/cuda129.yaml index 9396d2c309..a52151a8de 100644 --- a/recipe/migrations/cuda129.yaml +++ b/recipe/migrations/cuda129.yaml @@ -13,11 +13,15 @@ __migrator: primary_key: cuda_compiler_version ordering: cuda_compiler_version: - - 11.8 - 12.4 - 12.6 + - 12.8 - None - 12.9 + # to allow manual opt-in for CUDA 11.8, see + # https://github.com/conda-forge/conda-forge-pinning-feedstock/pull/7472 + # must be last due to how cuda_compiler ordering in that migrator works + - 11.8 commit_message: | Upgrade to CUDA 12.9 From 3d8cab80a4a701cf5811c9076879c489785db10f Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 22 Jun 2025 09:40:48 +1100 Subject: [PATCH 8/9] update architecture list and instructions in cuda129 migrator --- recipe/migrations/cuda129.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/recipe/migrations/cuda129.yaml b/recipe/migrations/cuda129.yaml index a52151a8de..6465566e35 100644 --- a/recipe/migrations/cuda129.yaml +++ b/recipe/migrations/cuda129.yaml @@ -25,9 +25,12 @@ __migrator: commit_message: | Upgrade to CUDA 12.9 - With CUDA 12.9, the following new architectures are added `sm_100`, `sm_101` and `sm_120`. - To build for these architectures, maintainers will need to add these to list of architectures - that their package builds for. + CUDA 12.8 added support for architectures `sm_100`, `sm_101` and `sm_120`, + while CUDA 12.9 further added `sm_103` and `sm_121`. To build for these, + maintainers will need to modify the list of specified architectures + (e.g. `CMAKE_CUDA_ARCHITECTURES`, `TORCH_CUDA_ARCH_LIST`, etc.) + for their package. A good balance between broad support and storage + footprint (resp. compilation time) is to add `sm_100` and `sm_120`. ref: https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#new-features From 824e51d76e4d98b1baf82d897a2335d28991b674 Mon Sep 17 00:00:00 2001 From: h-vetinari Date: Sat, 12 Jul 2025 10:35:19 +1100 Subject: [PATCH 9/9] add explanation about arches set by nvcc already Co-authored-by: Daniel Ching <9604511+carterbox@users.noreply.github.com> --- recipe/migrations/cuda129.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/recipe/migrations/cuda129.yaml b/recipe/migrations/cuda129.yaml index 6465566e35..dd015c53f9 100644 --- a/recipe/migrations/cuda129.yaml +++ b/recipe/migrations/cuda129.yaml @@ -27,11 +27,18 @@ __migrator: CUDA 12.8 added support for architectures `sm_100`, `sm_101` and `sm_120`, while CUDA 12.9 further added `sm_103` and `sm_121`. To build for these, - maintainers will need to modify the list of specified architectures + maintainers will need to modify their existing list of specified architectures (e.g. `CMAKE_CUDA_ARCHITECTURES`, `TORCH_CUDA_ARCH_LIST`, etc.) for their package. A good balance between broad support and storage footprint (resp. compilation time) is to add `sm_100` and `sm_120`. + Since CUDA 12.8, the conda-forge nvcc package now sets `CUDAARCHS` and + `TORCH_CUDA_ARCH_LIST` in its activation script to a string containing all + of the supported real architectures plus the virtual architecture of the + latest. Recipes for packages who use these variables to control their build + but do not want to build for all supported architectures will need to override + these variables in their build script. + ref: https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#new-features cuda_compiler_version: # [((linux and (x86_64 or aarch64)) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]