Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pkg 4786 update 2.21.5 cuda12.4 #2

Merged
merged 4 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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