Skip to content

Commit

Permalink
Merge pull request #2 from AnacondaRecipes/PKG-4786-update-2.21.5-cud…
Browse files Browse the repository at this point in the history
…a12.4

Pkg 4786 update 2.21.5 cuda12.4
  • Loading branch information
danpetry authored May 20, 2024
2 parents 68788de + c4c66c7 commit f29c304
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
16 changes: 16 additions & 0 deletions recipe/0002-use-conda-ar-not-system.patch
Original file line number Diff line number Diff line change
@@ -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)
5 changes: 3 additions & 2 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ 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}\""
fi
Expand All @@ -19,8 +20,8 @@ if [[ $CONDA_BUILD_CROSS_COMPILATION == "1" ]]; then
fi
fi

# `eval` is needed here for proper `${...}` expansion
eval make -j${CPU_COUNT} src.lib ${EXTRA_ARGS}
# Handing CUDA_HOME to make via an environment variable works; using eval and make args doesn't.
make -j${CPU_COUNT} src.lib

make install PREFIX="${PREFIX}"

Expand Down
7 changes: 4 additions & 3 deletions recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
# - 7.3 # [linux]
# cxx_compiler_version: # [linux]
# - 7.3 # [linux]
cuda_compiler: nvcc
cuda_compiler: cuda-nvcc
cuda_compiler_version:
- 9.2
#- 9.2
#- 10.0
# - 10.1
#- 10.2
#- 11.0
#- 11.0
- 12.4
8 changes: 5 additions & 3 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ source:
url: https://github.com/NVIDIA/nccl/archive/v{{ version }}.tar.gz
sha256: 1923596984d85e310b5b6c52b2c72a1b93da57218f2bc5a5c7ac3d59297a3303
patches:
# Upstreaming w/PR: https://github.com/NVIDIA/nccl/pull/854
- 0001-Allow-custom-NVCC-path.patch
# This isn't needed; setting CUDA_HOME sets NVCC correctly
#- 0001-Allow-custom-NVCC-path.patch
- 0002-use-conda-ar-not-system.patch

build:
number: 0
skip: true # [(not linux) or cuda_compiler_version in (undefined, "None", "10.2")]
skip: true # [(not linux) or s390x or cuda_compiler_version in (undefined, "None", "10.2")]
ignore_run_exports_from:
# Ignore `cudatoolkit` dependency in CUDA 11 builds
- {{ compiler("cuda") }} # [(cuda_compiler_version or "").startswith("11")]
Expand All @@ -28,6 +29,7 @@ requirements:
- {{ compiler("cxx") }}
- {{ compiler("cuda") }}
- make
- patch
host:
- cuda-version ={{ cuda_compiler_version }} # [(cuda_compiler_version or "").startswith("11")]
run:
Expand Down

0 comments on commit f29c304

Please sign in to comment.