diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 856f469..12647a5 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -76,8 +76,8 @@ else --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" ( startgroup "Inspecting artifacts" ) 2> /dev/null - # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 - command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" + # inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 + command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts --recipe-dir "${RECIPE_ROOT}" -m "${CONFIG_FILE}" || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" ( endgroup "Inspecting artifacts" ) 2> /dev/null ( startgroup "Validating outputs" ) 2> /dev/null diff --git a/README.md b/README.md index 7fae35c..8fcad59 100644 --- a/README.md +++ b/README.md @@ -208,6 +208,7 @@ In order to produce a uniquely identifiable distribution: Feedstock Maintainers ===================== +* [@conda-forge/cuda](https://github.com/orgs/conda-forge/teams/cuda/) * [@jakirkham](https://github.com/jakirkham/) * [@leofang](https://github.com/leofang/) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ad85a2c..95d88f6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,5 +2,30 @@ # update the conda-forge.yml and/or the recipe/meta.yaml. # -*- mode: yaml -*- -jobs: - - template: ./.azure-pipelines/azure-pipelines-linux.yml \ No newline at end of file +stages: +- stage: Check + jobs: + - job: Skip + pool: + vmImage: 'ubuntu-22.04' + variables: + DECODE_PERCENTS: 'false' + RET: 'true' + steps: + - checkout: self + fetchDepth: '2' + - bash: | + git_log=`git log --max-count=1 --skip=1 --pretty=format:"%B" | tr "\n" " "` + echo "##vso[task.setvariable variable=log]$git_log" + displayName: Obtain commit message + - bash: echo "##vso[task.setvariable variable=RET]false" + condition: or(contains(variables.log, '[skip azp]'), contains(variables.log, '[azp skip]'), contains(variables.log, '[skip ci]'), contains(variables.log, '[ci skip]')) + displayName: Skip build? + - bash: echo "##vso[task.setvariable variable=start_main;isOutput=true]$RET" + name: result + displayName: Export result +- stage: Build + condition: and(succeeded(), eq(dependencies.Check.outputs['Skip.result.start_main'], 'true')) + dependsOn: Check + jobs: + - template: ./.azure-pipelines/azure-pipelines-linux.yml \ No newline at end of file diff --git a/recipe/0001-Allow-custom-NVCC-path.patch b/recipe/0001-Allow-custom-NVCC-path.patch deleted file mode 100644 index 95fc842..0000000 --- a/recipe/0001-Allow-custom-NVCC-path.patch +++ /dev/null @@ -1,25 +0,0 @@ -From bb149b1811ad60c5426f533f2eaaa3805c364255 Mon Sep 17 00:00:00 2001 -From: Peter Andreas Entschev -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 - diff --git a/recipe/0001-use-conda-ar-not-system.patch b/recipe/0001-use-conda-ar-not-system.patch new file mode 100644 index 0000000..0399e15 --- /dev/null +++ b/recipe/0001-use-conda-ar-not-system.patch @@ -0,0 +1,16 @@ +This fixes an issue where the build fails on linux-aarch64, because a system ar +can't be found. Presumably it's using the system ar on other platforms, too, +which isn't ideal. +Index: nccl/src/Makefile +=================================================================== +--- nccl.orig/src/Makefile 2024-05-16 16:58:16.522514975 -0500 ++++ nccl/src/Makefile 2024-05-16 17:47:45.959416166 -0500 +@@ -83,7 +83,7 @@ + $(LIBDIR)/$(STATICLIBTARGET): $(LIBOBJ) $(DEVMANIFEST) + @printf "Archiving %-35s > %s\n" $(STATICLIBTARGET) $@ + mkdir -p $(LIBDIR) +- ar cr $@ $(LIBOBJ) $$(cat $(DEVMANIFEST)) ++ $(AR) cr $@ $(LIBOBJ) $$(cat $(DEVMANIFEST)) + + $(PKGDIR)/nccl.pc : nccl.pc.in + mkdir -p $(PKGDIR) diff --git a/recipe/build.sh b/recipe/build.sh index ce8df31..8c1aa68 100755 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -1,26 +1,23 @@ #!/bin/bash -EXTRA_ARGS="CUDARTLIB=\"cudart_static\"" - if [[ "${cuda_compiler_version}" =~ 12.* ]]; then - EXTRA_ARGS="${EXTRA_ARGS} CUDA_HOME=\"${PREFIX}\" NVCC=\"${BUILD_PREFIX}/bin/nvcc\"" + export CUDA_HOME=${BUILD_PREFIX} elif [[ "${cuda_compiler_version}" != "None" ]]; then - EXTRA_ARGS="${EXTRA_ARGS} CUDA_HOME=\"${CUDA_PATH}\"" + export CUDA_HOME=${CUDA_PATH} fi 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/\"" + export CUDA_LIB=${CUDA_HOME}/targets/sbsa-linux/lib/ elif [[ $target_platform == linux-ppc64le ]]; then - EXTRA_ARGS="${EXTRA_ARGS} CUDA_LIB=\"${CUDA_HOME}/targets/ppc64le-linux/lib/\"" + export CUDA_LIB=${CUDA_HOME}/targets/ppc64le-linux/lib/ else echo "not supported" exit -1 fi fi -# `eval` is needed here for proper `${...}` expansion -eval make -j${CPU_COUNT} src.lib ${EXTRA_ARGS} +make -j${CPU_COUNT} src.lib make install PREFIX="${PREFIX}" diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 96109eb..975b65e 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -9,11 +9,10 @@ source: url: https://github.com/NVIDIA/nccl/archive/v{{ version }}.tar.gz sha256: 6b946b70a9d2d01871842cbd15ec56488d358abe9a0f3767e372fddc3e241ba7 patches: - # Upstreaming w/PR: https://github.com/NVIDIA/nccl/pull/854 - - 0001-Allow-custom-NVCC-path.patch + - 0001-use-conda-ar-not-system.patch build: - number: 0 + number: 1 skip: true # [(not linux) or cuda_compiler_version in (undefined, "None", "10.2")] ignore_run_exports_from: # Ignore `cudatoolkit` dependency in CUDA 11 builds