Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with CUDA 12 #85

Merged
merged 57 commits into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
97ba5b4
Build with CUDA 12 from `nvidia` channel
pentschev Apr 13, 2023
cf097e7
Revert unnecessary changest to `conda-forge.yml`
pentschev Apr 13, 2023
9f31148
Hardcode CUDA version for now
pentschev Apr 13, 2023
5b23d89
MNT: Re-rendered with conda-build 3.24.0, conda-smithy 3.23.1, and co…
pentschev Apr 13, 2023
3c7cd1e
Add `cuda-nvcc`
pentschev Apr 13, 2023
a138a69
Bump to 2.17.1-1
pentschev Apr 13, 2023
df7d825
Update package checksum
pentschev Apr 13, 2023
b4106b6
TRACE_CALL patch
pentschev Apr 13, 2023
a9e7e39
Debug Makefile patch
pentschev Apr 13, 2023
f32cb91
More NVCC debug output
pentschev Apr 13, 2023
12b753e
Switch aarch64/ppc64le back to Travis
pentschev Apr 13, 2023
c462f5f
Comment out debug patch
pentschev Apr 13, 2023
86cd97a
Remove `nvidia` channel
pentschev Apr 20, 2023
4701a6d
Set `CFLAGS`/`CXXFLAGS` with missing includes/libraries
pentschev Apr 20, 2023
7477b4c
Add CUDA < 12 build support back
pentschev Apr 21, 2023
e29c4c8
MNT: Re-rendered with conda-build 3.24.0, conda-smithy 3.23.1, and co…
pentschev Apr 21, 2023
8f31255
Drop CUDA 10.2 which is no longer supported by NCCL
pentschev Apr 21, 2023
4a3cd96
MNT: Re-rendered with conda-build 3.24.0, conda-smithy 3.23.1, and co…
pentschev Apr 21, 2023
641cb1e
Remove Makefile debug patch
pentschev Apr 21, 2023
55fb121
Remove ppc64le until cross-compiling is available
pentschev Apr 24, 2023
23f1425
MNT: Re-rendered with conda-build 3.24.0, conda-smithy 3.23.1, and co…
pentschev Apr 24, 2023
51f662b
Drop conda_build_config changes
pentschev May 3, 2023
ff3630c
Add CUDA 12 migrators
pentschev May 3, 2023
a5a80a7
MNT: Re-rendered with conda-build 3.24.0, conda-smithy 3.23.1, and co…
pentschev May 3, 2023
d17c598
Skip non-CUDA builds and drop CUDA selector
pentschev May 3, 2023
277c845
MNT: Re-rendered with conda-build 3.24.0, conda-smithy 3.23.1, and co…
pentschev May 3, 2023
a3fd811
Skip unsupported CUDA 10.2 build
pentschev May 3, 2023
31caf43
MNT: Re-rendered with conda-build 3.24.0, conda-smithy 3.23.1, and co…
pentschev May 3, 2023
de41b70
try the simplified migrator
leofang May 9, 2023
4148afe
Remove CUDA packages that are not needed anymore
pentschev May 25, 2023
7bf728a
Merge remote-tracking branch 'origin/cuda-12-nvidia-channel' into cud…
pentschev May 25, 2023
b61dcac
Drop compilers from `host` section
pentschev May 26, 2023
619d999
Fix CUDA_HOME and NVCC paths
pentschev May 26, 2023
8257150
Remove not anymore necessary patch disabling trace call
pentschev May 26, 2023
7d5ba69
Add ppc64le builds back
pentschev May 30, 2023
1695ca1
Remove redundant `target_platform` use
pentschev May 30, 2023
5b6cc78
Move `NVCC_GENCODE` to `EXTRA_ARGS`
pentschev May 30, 2023
3eeec28
Add comment to NVCC path patch
pentschev May 30, 2023
553cc09
MNT: Re-rendered with conda-build 3.23.3, conda-smithy 3.23.1, and co…
pentschev May 30, 2023
8962596
Fix indentation
pentschev May 30, 2023
f58dd4f
Stick with Azure (on other archs)
jakirkham May 30, 2023
496507d
Preserving original order in `conda-forge.yml`
jakirkham May 30, 2023
88b25b7
MNT: Re-rendered with conda-build 3.25.0, conda-smithy 3.23.1, and co…
May 30, 2023
5c78294
Escape strings
pentschev May 30, 2023
163d496
Update skip condition
pentschev May 30, 2023
6ce9b23
Fix `NVCC_GENCODE` expansion
pentschev May 30, 2023
fbe7113
Add compute arch 9.0 for CUDA 12
pentschev May 30, 2023
740b963
Remove CUDA 12 migrator files
pentschev May 31, 2023
4ea1655
MNT: Re-rendered with conda-build 3.23.3, conda-smithy 3.23.1, and co…
pentschev May 31, 2023
9afc914
Add `cuda120.yaml` from `conda-forge-pinning`
jakirkham May 31, 2023
7d232f3
MNT: Re-rendered with conda-build 3.25.0, conda-smithy 3.23.1, and co…
May 31, 2023
ef7708c
Turn off CI storage
jakirkham May 31, 2023
1485641
MNT: Re-rendered with conda-build 3.25.0, conda-smithy 3.23.1, and co…
May 31, 2023
2174d93
Merge remote-tracking branch 'upstream/main' into cuda-12-nvidia-channel
pentschev Jun 1, 2023
3be86a3
Refresh `cuda120` migrator
jakirkham Jun 1, 2023
3a61087
Revert build number to 0 since version is being bumped
pentschev Jun 1, 2023
06b7fd8
Merge remote-tracking branch 'origin/cuda-12-nvidia-channel' into cud…
pentschev Jun 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .azure-pipelines/azure-pipelines-linux.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
c_compiler:
- gcc
c_compiler_version:
- '7'
- '12'
cdt_name:
- cos6
- cos7
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
- nvcc
- cuda-nvcc
cuda_compiler_version:
- '10.2'
- '12.0'
cxx_compiler:
- gxx
cxx_compiler_version:
- '7'
- '12'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-cuda:10.2
- quay.io/condaforge/linux-anvil-cos7-x86_64
target_platform:
- linux-64
zip_keys:
Expand Down
72 changes: 72 additions & 0 deletions .ci_support/migrations/cuda120.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
migrator_ts: 1682985063
__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:
cxx_compiler_version:
- 9
- 8
- 7
c_compiler_version:
- 9
- 8
- 7
fortran_compiler_version:
- 9
- 8
- 7
docker_image:
- quay.io/condaforge/linux-anvil-comp7 # [os.environ.get("BUILD_PLATFORM") == "linux-64"]
- quay.io/condaforge/linux-anvil-aarch64 # [os.environ.get("BUILD_PLATFORM") == "linux-aarch64"]
- quay.io/condaforge/linux-anvil-ppc64le # [os.environ.get("BUILD_PLATFORM") == "linux-ppc64le"]
- quay.io/condaforge/linux-anvil-armv7l # [os.environ.get("BUILD_PLATFORM") == "linux-armv7l"]
- quay.io/condaforge/linux-anvil-cuda:9.2 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"]
- quay.io/condaforge/linux-anvil-cuda:10.0 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"]
- quay.io/condaforge/linux-anvil-cuda:10.1 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"]
- quay.io/condaforge/linux-anvil-cuda:10.2 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"]
- quay.io/condaforge/linux-anvil-cuda:11.0 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"]
- quay.io/condaforge/linux-anvil-cuda:11.1 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"]
- quay.io/condaforge/linux-anvil-cuda:11.2 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"]
- quay.io/condaforge/linux-anvil-cos7-x86_64 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"]
cuda_compiler_version:
- None
- 10.2 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 11.0 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 11.1 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 11.2 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 12.0 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
commit_message: "Rebuild for CUDA 12"

cuda_compiler: # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- cuda-nvcc # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]

cuda_compiler_version: # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 12.0 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]

c_compiler_version: # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 12 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]

cxx_compiler_version: # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 12 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]

fortran_compiler_version: # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 12 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]

cudnn: # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 8 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]

cdt_name: # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- cos7 # [linux64 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"]
- quay.io/condaforge/linux-anvil-cos7-x86_64 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64" and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
4 changes: 2 additions & 2 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions recipe/0001-Allow-custom-NVCC-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From bb149b1811ad60c5426f533f2eaaa3805c364255 Mon Sep 17 00:00:00 2001
From: Peter Andreas Entschev <peter@entschev.com>
Date: Fri, 26 May 2023 13:25:10 -0700
Subject: [PATCH] Allow custom NVCC path

---
makefiles/common.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/makefiles/common.mk b/makefiles/common.mk
index 35d1826..abdc773 100644
--- a/makefiles/common.mk
+++ b/makefiles/common.mk
@@ -13,7 +13,7 @@ TRACE ?= 0
PROFAPI ?= 1
NVTX ?= 1

-NVCC = $(CUDA_HOME)/bin/nvcc
+NVCC ?= $(CUDA_HOME)/bin/nvcc

CUDA_LIB ?= $(CUDA_HOME)/lib64
CUDA_INC ?= $(CUDA_HOME)/include
--
2.40.1

8 changes: 7 additions & 1 deletion recipe/build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
#!/bin/bash

EXTRA_ARGS="CUDARTLIB=\"cudart_static\""
leofang marked this conversation as resolved.
Show resolved Hide resolved

if [[ "${cuda_compiler_version}" =~ 12.* ]]; then
EXTRA_ARGS="${EXTRA_ARGS} CUDA_HOME=\"${PREFIX}\" NVCC=\"${BUILD_PREFIX}/bin/nvcc\""
elif [[ "${cuda_compiler_version}" != "None" ]]; then
EXTRA_ARGS="${EXTRA_ARGS} CUDA_HOME=\"${CUDA_PATH}\""
fi

EXTRA_ARGS="CUDA_HOME=\"${CUDA_HOME}\" CUDARTLIB=\"cudart_static\""
leofang marked this conversation as resolved.
Show resolved Hide resolved
if [[ $CONDA_BUILD_CROSS_COMPILATION == "1" ]]; then
if [[ $target_platform == linux-aarch64 ]]; then
EXTRA_ARGS="${EXTRA_ARGS} CUDA_LIB=\"${CUDA_HOME}/targets/sbsa-linux/lib/\""
Expand Down
11 changes: 7 additions & 4 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
{% set name = "nccl" %}
{% set version = "2.15.5-1" %}
{% set version = "2.17.1-1" %}

package:
name: {{ name|lower }}
version: {{ version|replace("-", ".") }}

source:
url: https://github.com/NVIDIA/nccl/archive/v{{ version }}.tar.gz
sha256: f4ac3c74d469c9cd718f82e1477759785db9b9f8cc9d9ecc103485805b8394a3
sha256: 1311a6fd7cd44ad6d4523ba03065ce694605843fd30a5c0f77aa3d911abe706d
patches:
# Upstreaming w/PR: https://github.com/NVIDIA/nccl/pull/854
- 0001-Allow-custom-NVCC-path.patch

build:
number: 1
skip: true # [(not linux) or cuda_compiler_version in (undefined, "None")]
number: 0
skip: true # [(not linux) or cuda_compiler_version in (undefined, "None", "10.2")]
run_exports:
# xref: https://github.com/NVIDIA/nccl/issues/218
- {{ pin_subpackage(name, max_pin="x") }}
Expand Down