Skip to content

Commit a3adce5

Browse files
Fix libclang download for Rust, CUDA initialization for C tests (rapidsai#1652)
Searching in `/opt/conda` for libclang was causing it to sometimes find libclang in the package directory instead of the environment. Search the environment only. Also initialize CUDA architectures for C tests in case `$CUDAARCHS` is set to `RAPIDS`. Authors: - Kyle Edwards (https://github.com/KyleFromNVIDIA) Approvers: - Divye Gala (https://github.com/divyegala) - Dante Gama Dessavre (https://github.com/dantegd) - Bradley Dice (https://github.com/bdice) URL: rapidsai#1652
1 parent 8262fe6 commit a3adce5

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

.github/workflows/publish-rust.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
conda activate rust
4545
set -eu
4646
47-
LIBCLANG_PATH=$(dirname "$(find /opt/conda -name libclang.so | head -n 1)")
47+
LIBCLANG_PATH=$(dirname "$(find "$CONDA_PREFIX" -name libclang.so | head -n 1)")
4848
export LIBCLANG_PATH
4949
echo "LIBCLANG_PATH=$LIBCLANG_PATH"
5050

c/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ endif()
201201
# ##################################################################################################
202202
# * build tests ----------------------------------------------------
203203
if(BUILD_TESTS)
204+
include(rapids-cuda)
205+
rapids_cuda_init_architectures(CUVS_C)
204206
enable_language(CUDA)
205207
find_package(CUDAToolkit REQUIRED)
206208

ci/build_docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ popd
4545

4646
rapids-logger "Build Rust docs"
4747
pushd rust
48-
LIBCLANG_PATH=$(dirname "$(find /opt/conda -name libclang.so | head -n 1)")
48+
LIBCLANG_PATH=$(dirname "$(find "$CONDA_PREFIX" -name libclang.so | head -n 1)")
4949
export LIBCLANG_PATH
5050
cargo doc -p cuvs --no-deps
5151
popd

ci/build_rust.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ sccache --stop-server 2>/dev/null || true
4444

4545
# we need to set up LIBCLANG_PATH to allow rust bindgen to work,
4646
# grab it from the conda env
47-
LIBCLANG_PATH=$(dirname "$(find /opt/conda -name libclang.so | head -n 1)")
47+
LIBCLANG_PATH=$(dirname "$(find "$CONDA_PREFIX" -name libclang.so | head -n 1)")
4848
export LIBCLANG_PATH
4949
echo "LIBCLANG_PATH=$LIBCLANG_PATH"
5050

examples/rust/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You may prefer to use `mamba`, as it provides significant speedup over `conda`.
1616

1717
1. Set up the required environment variables:
1818
```bash
19-
LIBCLANG_PATH=$(dirname "$(find /opt/conda -name libclang.so | head -n 1)")
19+
LIBCLANG_PATH=$(dirname "$(find "$CONDA_PREFIX" -name libclang.so | head -n 1)")
2020
export LIBCLANG_PATH
2121
echo "LIBCLANG_PATH=$LIBCLANG_PATH"
2222
```

0 commit comments

Comments
 (0)