Skip to content

Commit

Permalink
Merge pull request #31 from conda-forge-admin/conda_forge_admin_30
Browse files Browse the repository at this point in the history
Rebuild for CUDA 12
  • Loading branch information
carterbox authored Jun 6, 2023
2 parents be97f11 + 831fb26 commit abc21f9
Show file tree
Hide file tree
Showing 13 changed files with 191 additions and 54 deletions.
16 changes: 13 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
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 @@ -21,7 +21,7 @@ cxx_compiler:
cxx_compiler_version:
- '10'
docker_image:
- quay.io/condaforge/linux-anvil-aarch64-cuda:11.2
- quay.io/condaforge/linux-anvil-cuda:11.2
libblas:
- 3.9 *netlib
liblapack:
Expand All @@ -31,6 +31,7 @@ target_platform:
zip_keys:
- - c_compiler_version
- cxx_compiler_version
- cuda_compiler
- cuda_compiler_version
- cdt_name
- docker_image
80 changes: 80 additions & 0 deletions .ci_support/migrations/cuda120.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
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
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
should depend directly on the specific CUDA libraries (libblas, libcusolver,
etc) as needed. For an in-depth overview of the changes and to report problems
[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: # [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"]
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
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

28 changes: 14 additions & 14 deletions README.md

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

11 changes: 6 additions & 5 deletions conda-forge.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
conda_build:
error_overlinking: true
pkg_format: '2'
conda_forge_output_validation: true
github:
branch_name: main
tooling_branch_name: main
azure:
# Enable artifact storage to test with GPUs locally
store_build_artifacts: true
conda_build:
pkg_format: '2'
provider:
linux_aarch64: default
linux_ppc64le: default
azure:
# Enable artifact storage to test with GPUs locally
store_build_artifacts: true
build_platform:
linux_ppc64le: linux_64
linux_aarch64: linux_64
4 changes: 2 additions & 2 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ 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_60,sm_70,sm_80"
set "CUDAARCHS=35-virtual;60-virtual;70-virtual;80-virtual"
set "CUDA_ARCH_LIST=sm_35,sm_50,sm_60,sm_70,sm_75,sm_80"
set "CUDAARCHS=35-virtual;50-virtual;60-virtual;70-virtual;75-virtual;80-virtual"

md build
cd build
Expand Down
28 changes: 25 additions & 3 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,35 @@ set -exv
# This step is required when building from raw source archive
make generate --jobs ${CPU_COUNT}

# Only about 7 virtual archs can be built 6 hours for CUDA 11

# 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_61,sm_70,sm_75,sm_80"
export CUDAARCHS="35-virtual;50-virtual;60-virtual;61-virtual;70-virtual;75-virtual;80-virtual"

if [[ "$cuda_compiler_version" == "12.0" ]]; then
export CUDA_ARCH_LIST="sm_50,sm_60,sm_61,sm_70,sm_75,sm_80,sm_86,sm_89,sm_90"
export CUDAARCHS="50-virtual;60-virtual;61-virtual;70-virtual;75-virtual;80-virtual;86-virtual;89-virtual;90-virtual"
fi

if [[ "$target_platform" == "linux-ppc64le" ]]; then
export CUDA_ARCH_LIST="sm_50,sm_60,sm_61,sm_70,sm_75,sm_80,sm_86"
export CUDAARCHS="50-virtual;60-virtual;61-virtual;70-virtual;75-virtual;80-virtual;86-virtual"
fi

# Jetsons are more common for ARM devices, so target those minor versions
if [[ "$target_platform" == "linux-aarch64" ]]; then
export CUDA_ARCH_LIST="sm_50,sm_53,sm_60,sm_62,sm_70,sm_72,sm_80,"
export CUDAARCHS="50-virtual;53-virtual;60-virtual;62-virtual;70-virtual;72-virtual;80-virtual"
fi

# Remove CXX standard flags added by conda-forge. std=c++11 is required to
# compile some .cu files
CXXFLAGS="${CXXFLAGS//-std=c++17/-std=c++11}"
export CXXFLAGS="${CXXFLAGS//-std=c++17/-std=c++11}"

# Conda-forge nvcc compiler flags environment variable doesn't match CMake environment variable
# Redirect it so that the flags are added to nvcc calls
export CUDAFLAGS="${CUDAFLAGS} ${CUDA_CFLAGS}"

mkdir build
cd build
Expand Down
10 changes: 9 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@
'z_v1_map'
] %}

{% set cuda_major = environ.get("cuda_compiler_version", "11.2").split(".")[0]|int %}

package:
name: libmagma_sparse
version: {{ version }}
Expand All @@ -99,7 +101,7 @@ source:
- manual-link.patch

build:
number: 2
number: 3
skip: true # [cuda_compiler_version == "None"]
skip: true # [cuda_compiler_version == "10.2"]
skip: true # [cuda_compiler_version == "11.0"]
Expand All @@ -124,6 +126,12 @@ requirements:
- ninja
- python
host:
{% if cuda_major == 12 %}
- cuda-cudart-dev
- cuda-profiler-api
- libcublas-dev
- libcusparse-dev
{% endif %}
- liblapack
- libblas
- libmagma {{ version }}
Expand Down

0 comments on commit abc21f9

Please sign in to comment.