Skip to content

Commit

Permalink
Rebuild for CUDA 12 w/arch + Windows support (#13)
Browse files Browse the repository at this point in the history
automerged PR by conda-forge/automerge-action
  • Loading branch information
github-actions[bot] authored Nov 23, 2023
2 parents 0e9f61e + 3f128a2 commit 6b19803
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 29 deletions.
3 changes: 3 additions & 0 deletions .azure-pipelines/azure-pipelines-linux.yml

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

3 changes: 3 additions & 0 deletions .azure-pipelines/azure-pipelines-win.yml

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

22 changes: 11 additions & 11 deletions .ci_support/migrations/cuda120.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ __migrator:
kind:
version
migration_number:
2
3
build_number:
1
paused: false
Expand Down Expand Up @@ -47,13 +47,13 @@ __migrator:
- 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 # [(linux or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 12.0 # [(linux or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 10.2 # [(linux64 or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 11.0 # [(linux64 or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 11.1 # [(linux64 or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 11.2 # [(linux or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 12.0 # [(linux or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
commit_message: |
Rebuild for CUDA 12 w/arch support
Rebuild for CUDA 12 w/arch + Windows support
The transition to CUDA 12 SDK includes new packages for all CUDA libraries and
build tools. Notably, the cudatoolkit package no longer exists, and packages
Expand All @@ -62,11 +62,11 @@ __migrator:
[see this issue]( https://github.com/conda-forge/conda-forge.github.io/issues/1963 ).
Please feel free to raise any issues encountered there. Thank you! :pray:
cuda_compiler: # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- cuda-nvcc # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
cuda_compiler: # [(linux or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- cuda-nvcc # [(linux or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]

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

c_compiler_version: # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 12 # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
Expand Down
17 changes: 13 additions & 4 deletions .scripts/build_steps.sh

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

3 changes: 3 additions & 0 deletions .scripts/run_docker_build.sh

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

12 changes: 10 additions & 2 deletions .scripts/run_win_build.bat

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

2 changes: 1 addition & 1 deletion README.md

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

23 changes: 19 additions & 4 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
@echo on

:: This step is required when building from raw source archive
make generate --jobs %CPU_COUNT%
if errorlevel 1 exit /b 1
:: make generate --jobs %CPU_COUNT%
:: if errorlevel 1 exit /b 1

:: Duplicate lists because of https://bitbucket.org/icl/magma/pull-requests/32
set "CUDA_ARCH_LIST=sm_35,sm_50,sm_60,sm_70,sm_80"
set "CUDAARCHS=35-virtual;50-virtual;60-virtual;70-virtual;80-virtual"
set "CUDA_ARCH_LIST=sm_50,sm_60,sm_70,sm_80"
set "CUDAARCHS=50-virtual;60-virtual;70-virtual;80-virtual"

if "%cuda_compiler_version%"=="11.2" (
set "CUDA_ARCH_LIST=sm_35,%CUDA_ARCH_LIST%"
set "CUDAARCHS=35-virtual;%CUDAARCHS%"
)

if "%cuda_compiler_version%"=="11.8" (
set "CUDA_ARCH_LIST=sm_35,%CUDA_ARCH_LIST%,sm_90"
set "CUDAARCHS=35-virtual;%CUDAARCHS%;90-virtual"
)

if "%cuda_compiler_version%"=="12.0" (
set "CUDA_ARCH_LIST=%CUDA_ARCH_LIST%,sm_90"
set "CUDAARCHS=%CUDAARCHS%;90-virtual"
)

md build
cd build
Expand Down
6 changes: 0 additions & 6 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,11 @@ fi
if [[ "$target_platform" == "linux-ppc64le" ]]; then
export CUDA_ARCH_LIST=${CUDA_ARCH_LIST//,sm_89/}
export CUDAARCHS=${CUDAARCHS//;89-real/}
if [[ "$cuda_compiler_version" == "11"* ]]; then
export CMAKE_ARGS="${CMAKE_ARGS} -DCUDAToolkit_ROOT=/usr/local/cuda/targets/ppc64le-linux"
fi
fi

if [[ "$target_platform" == "linux-aarch64" ]]; then
export CUDA_ARCH_LIST=${CUDA_ARCH_LIST//,sm_89/}
export CUDAARCHS=${CUDAARCHS//;89-real/}
if [[ "$cuda_compiler_version" == "11"* ]]; then
export CMAKE_ARGS="${CMAKE_ARGS} -DCUDAToolkit_ROOT=/usr/local/cuda/targets/sbsa-linux"
fi
fi

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

build:
number: 0
number: 1
skip: true # [cuda_compiler_version == "None"]
skip: true # [cuda_compiler_version == "10.2"]
skip: true # [cuda_compiler_version == "11.0"]
skip: true # [cuda_compiler_version == "11.1"]
skip: true # [win and (cuda_compiler_version == "12.0")]
run_exports:
- {{ pin_subpackage('libmagma', max_pin='x.x.x') }}

Expand Down

0 comments on commit 6b19803

Please sign in to comment.