Skip to content

Commit

Permalink
Make libcudart an optional dependency (#173)
Browse files Browse the repository at this point in the history
automerged PR by conda-forge/automerge-action
  • Loading branch information
github-actions[bot] authored Apr 29, 2024
2 parents c7e9896 + 272433b commit 157e34c
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ rdma_core:
- '51'
target_platform:
- linux-64
ucx:
- 1.15.0
zip_keys:
- - c_compiler_version
- cxx_compiler_version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ rdma_core:
- '51'
target_platform:
- linux-64
ucx:
- 1.15.0
zip_keys:
- - c_compiler_version
- cxx_compiler_version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ rdma_core:
- '51'
target_platform:
- linux-aarch64
ucx:
- 1.15.0
zip_keys:
- - c_compiler_version
- cxx_compiler_version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ rdma_core:
- '51'
target_platform:
- linux-aarch64
ucx:
- 1.15.0
zip_keys:
- - c_compiler_version
- cxx_compiler_version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ rdma_core:
- '51'
target_platform:
- linux-ppc64le
ucx:
- 1.15.0
zip_keys:
- - c_compiler_version
- cxx_compiler_version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ rdma_core:
- '51'
target_platform:
- linux-ppc64le
ucx:
- 1.15.0
zip_keys:
- - c_compiler_version
- cxx_compiler_version
Expand Down
1 change: 1 addition & 0 deletions conda-forge.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
azure:
store_build_artifacts: true
conda_build:
error_overlinking: true
pkg_format: '2'
conda_forge_output_validation: true
github:
Expand Down
3 changes: 3 additions & 0 deletions recipe/install_ucx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ fi
--prefix="${PREFIX}" \
--with-sysroot \
--disable-static \
--enable-openmp \
--enable-cma \
--enable-mt \
--with-gnu-ld \
Expand All @@ -25,3 +26,5 @@ fi

make -j${CPU_COUNT}
make install

cp "${RECIPE_DIR}/ucx-post-link.sh" "${PREFIX}/bin/.ucx-post-link.sh"
24 changes: 18 additions & 6 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ source:

build:
skip: true # [not linux or cuda_compiler_version in ("None", "11.2")]
number: 1
number: 2

outputs:
- name: ucx
Expand All @@ -19,6 +19,11 @@ outputs:
- {{ pin_subpackage("ucx", max_pin="x.x") }}
ignore_run_exports_from:
- {{ compiler("cuda") }}
- cuda-cudart-dev # [(cuda_compiler_version or "None").startswith("12")]
missing_dso_whitelist:
- "*libcuda.so*"
- "*libcudart.so*"
- "*libnvidia-ml.so*"
requirements:
build:
- {{ compiler("c") }}
Expand All @@ -29,13 +34,20 @@ outputs:
- libtool
- make
- pkg-config
- libgomp
host:
- cuda-cudart-dev ={{ cuda_compiler_version }} # [(cuda_compiler_version or "None").startswith("12")]
- cuda-nvml-dev ={{ cuda_compiler_version }} # [(cuda_compiler_version or "None").startswith("12")]
- cuda-version {{ cuda_compiler_version }}
- cuda-cudart-dev # [(cuda_compiler_version or "None").startswith("12")]
- cuda-nvml-dev # [(cuda_compiler_version or "None").startswith("12")]
- rdma-core
run_constrained:
- cuda-version >=11.2,<12 # [(cuda_compiler_version or "None").startswith("11")]
- cuda-version >=12,<13 # [(cuda_compiler_version or "None").startswith("12")]
# The actual version constraint comes from cuda-version, so below we explicit list
# them only to codify that these are expected (but optional) dependencies when CUDA
# is in use.
- cudatoolkit # [(cuda_compiler_version or "None").startswith("11")]
- cuda-cudart # [(cuda_compiler_version or "None").startswith("12")]

script: install_ucx.sh
test:
Expand All @@ -48,10 +60,10 @@ outputs:
- test ! -f "${PREFIX}/lib/libucs.a"
- test -f "${PREFIX}/lib/libuct${SHLIB_EXT}"
- test ! -f "${PREFIX}/lib/libuct.a"
- test -f "${PREFIX}/bin/.ucx-post-link.sh"
- test -f "${PREFIX}/bin/ucx_info"
# Requires driver for GPU test.
# Crashes qemu on ppc64le.
- ${PREFIX}/bin/ucx_info -v # [cuda_compiler_version == "None" and not ppc64le]
# Fails on ppc64le
- ucx_info -v # [not ppc64le]
about:
home: https://openucx.org
license: BSD-3-Clause
Expand Down
11 changes: 11 additions & 0 deletions recipe/ucx-post-link.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

cat << EOF >> "${PREFIX}/.messages.txt"
To enable CUDA support, UCX requires the CUDA Runtime library (libcudart).
The library can be installed with the appropriate command below:
* For CUDA 11, run: conda install cudatoolkit cuda-version=11
* For CUDA 12, run: conda install cuda-cudart cuda-version=12
EOF

0 comments on commit 157e34c

Please sign in to comment.