diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 96b40ab..ec6e9f8 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -87,6 +87,9 @@ jobs: - script: | export CI=azure + export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) + export remote_url=$(Build.Repository.Uri) + export sha=$(Build.SourceVersion) export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index 5cb770d..8bf068f 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -47,6 +47,9 @@ jobs: PYTHONUNBUFFERED: 1 CONFIG: $(CONFIG) CI: azure + flow_run_id: azure_$(Build.BuildNumber).$(System.JobAttempt) + remote_url: $(Build.Repository.Uri) + sha: $(Build.SourceVersion) UPLOAD_PACKAGES: $(UPLOAD_PACKAGES) UPLOAD_TEMP: $(UPLOAD_TEMP) BINSTAR_TOKEN: $(BINSTAR_TOKEN) diff --git a/.ci_support/migrations/cuda120.yaml b/.ci_support/migrations/cuda120.yaml index 49da33d..abfb9cb 100644 --- a/.ci_support/migrations/cuda120.yaml +++ b/.ci_support/migrations/cuda120.yaml @@ -3,7 +3,7 @@ __migrator: kind: version migration_number: - 2 + 3 build_number: 1 paused: false @@ -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 @@ -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"] diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index d20d8f4..ab7bc8f 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -28,13 +28,15 @@ conda-build: pkgs_dirs: - ${FEEDSTOCK_ROOT}/build_artifacts/pkg_cache - /opt/conda/pkgs +solver: libmamba CONDARC +export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 mamba install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa conda-forge-ci-setup=3 + pip mamba conda-build conda-forge-ci-setup=4 mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa conda-forge-ci-setup=3 + pip mamba conda-build conda-forge-ci-setup=4 # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -52,6 +54,12 @@ if [[ -f "${FEEDSTOCK_ROOT}/LICENSE.txt" ]]; then cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" fi +if [[ "${sha:-}" == "" ]]; then + pushd ${FEEDSTOCK_ROOT} + sha=$(git rev-parse HEAD) + popd +fi + if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" @@ -63,9 +71,10 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then # Drop into an interactive shell /bin/bash else - conda mambabuild "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + conda build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ - --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" + --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ + --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" ( startgroup "Validating outputs" ) 2> /dev/null validate_recipe_outputs "${FEEDSTOCK_NAME}" diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 9236239..b70ef01 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -91,6 +91,9 @@ docker run ${DOCKER_RUN_ARGS} \ -e CPU_COUNT \ -e BUILD_WITH_CONDA_DEBUG \ -e BUILD_OUTPUT_ID \ + -e flow_run_id \ + -e remote_url \ + -e sha \ -e BINSTAR_TOKEN \ -e FEEDSTOCK_TOKEN \ -e STAGING_BINSTAR_TOKEN \ diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat index c4486d9..5f648db 100755 --- a/.scripts/run_win_build.bat +++ b/.scripts/run_win_build.bat @@ -17,10 +17,14 @@ call :start_group "Configuring conda" :: Activate the base conda environment call activate base +:: Configure the solver +set "CONDA_SOLVER=libmamba" +if !errorlevel! neq 0 exit /b !errorlevel! +set "CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1" :: Provision the necessary dependencies to build the recipe later echo Installing dependencies -mamba.exe install "python=3.10" pip mamba conda-build boa conda-forge-ci-setup=3 -c conda-forge --strict-channel-priority --yes +mamba.exe install "python=3.10" pip mamba conda-build conda-forge-ci-setup=4 -c conda-forge --strict-channel-priority --yes if !errorlevel! neq 0 exit /b !errorlevel! :: Set basic configuration @@ -38,11 +42,15 @@ if EXIST LICENSE.txt ( copy LICENSE.txt "recipe\\recipe-scripts-license.txt" ) +if NOT [%flow_run_id%] == [] ( + set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --extra-meta flow_run_id=%flow_run_id% remote_url=%remote_url% sha=%sha%" +) + call :end_group :: Build the recipe echo Building recipe -conda.exe mambabuild "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables %EXTRA_CB_OPTIONS% +conda.exe build "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables %EXTRA_CB_OPTIONS% if !errorlevel! neq 0 exit /b !errorlevel! :: Prepare some environment variables for the upload step diff --git a/README.md b/README.md index c26300a..642a34b 100644 --- a/README.md +++ b/README.md @@ -186,7 +186,7 @@ available continuous integration services. Thanks to the awesome service provide [CircleCI](https://circleci.com/), [AppVeyor](https://www.appveyor.com/), [Drone](https://cloud.drone.io/welcome), and [TravisCI](https://travis-ci.com/) it is possible to build and upload installable packages to the -[conda-forge](https://anaconda.org/conda-forge) [Anaconda-Cloud](https://anaconda.org/) +[conda-forge](https://anaconda.org/conda-forge) [anaconda.org](https://anaconda.org/) channel for Linux, Windows and OSX respectively. To manage the continuous integration and simplify feedstock maintenance diff --git a/recipe/bld.bat b/recipe/bld.bat index e410a99..ae1f4fc 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -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 diff --git a/recipe/build.sh b/recipe/build.sh index 92ed2b6..81ca784 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -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 diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 9af7c17..cef99c6 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -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') }}