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

Rebuild for CUDA 12 #4

11 changes: 8 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.

6 changes: 3 additions & 3 deletions .azure-pipelines/azure-pipelines-win.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
Expand Up @@ -27,6 +27,7 @@ target_platform:
zip_keys:
- - c_compiler_version
- cxx_compiler_version
- cuda_compiler
- cuda_compiler_version
- cdt_name
- docker_image
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
c_compiler:
- gcc
c_compiler_version:
- '12'
cdt_name:
- cos7
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
- cuda-nvcc
cuda_compiler_version:
- '12.0'
cxx_compiler:
- gxx
cxx_compiler_version:
- '12'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
carterbox marked this conversation as resolved.
Show resolved Hide resolved
libblas:
- 3.9 *netlib
liblapack:
- 3.9 *netlib
target_platform:
- linux-64
zip_keys:
- - c_compiler_version
- cxx_compiler_version
- cuda_compiler
- cuda_compiler_version
- cdt_name
- docker_image
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ target_platform:
zip_keys:
- - c_compiler_version
- cxx_compiler_version
- cuda_compiler
- cuda_compiler_version
- cdt_name
- docker_image
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 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- cuda-nvcc # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]

cuda_compiler_version: # [(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"]

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 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 8 # [(linux64 or win) 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"]
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ liblapack:
- 3.9 *netlib
target_platform:
- win-64
zip_keys:
- - cuda_compiler
- cuda_compiler_version
2 changes: 1 addition & 1 deletion .travis.yml

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

19 changes: 13 additions & 6 deletions README.md

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

14 changes: 10 additions & 4 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@ set -exv
make generate --jobs ${CPU_COUNT}

# Duplicate lists because of https://bitbucket.org/icl/magma/pull-requests/32
export CUDA_ARCH_LIST="sm_35,sm_50,sm_60,sm_70,sm_80"
export CUDAARCHS="35-virtual;50-virtual;60-virtual;70-virtual;80-virtual"
export CUDA_ARCH_LIST="sm_35,sm_50,sm_60,sm_70,sm_75,sm_80"
export CUDAARCHS="35-virtual;50-virtual;60-virtual;70-virtual;75-virtual;80-virtual"
carterbox marked this conversation as resolved.
Show resolved Hide resolved

# Only build the lowest non-deprecated arch to minimize build time
if [[ "$target_platform" == "linux-ppc64le" || "$target_platform" == "linux-aarch64" ]]; then
export CUDA_ARCH_LIST="sm_60"
export CUDAARCHS="60-virtual"
export CUDA_ARCH_LIST="sm_60;sm_80"
export CUDAARCHS="60-virtual;80-virtual"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export CUDA_ARCH_LIST="sm_60;sm_80"
export CUDAARCHS="60-virtual;80-virtual"
export CUDA_ARCH_LIST="sm_60"
export CUDAARCHS="60-virtual"

Still only enough time for one arch on Travis.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could try cross-compiling if that is helpful

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does CUDA 11 support cross-compile? If not, I need to wait for the second migrator for arm/ppc.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep it does. Several packages are already building for CUDA 11 using cross-compilation. For example nccl uses cross-compilation

It also will be supported for CUDA 12 (once work on the other archs wraps up)

fi

# Only build the lowest non-deprecated arch to minimize build time
if [[ "$cuda_compiler_version" == "12.0" ]]; then
export CUDA_ARCH_LIST="sm_50,sm_60,sm_70,sm_75,sm_80,sm_89"
export CUDAARCHS="50-virtual;60-virtual;70-virtual;75-virtual;80-virtual;89-virtual"
carterbox marked this conversation as resolved.
Show resolved Hide resolved
fi

# Remove CXX standard flags added by conda-forge. std=c++11 is required to
Expand Down
2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ source:
- optional-install.patch

build:
number: 1
number: 2
skip: true # [cuda_compiler_version=="None"]
skip: true # [cuda_compiler_version == "10.2"]
skip: true # [cuda_compiler_version == "11.0"]
Expand Down