From ed3375100b982509b95bbf1333ef58944f8068d5 Mon Sep 17 00:00:00 2001 From: tzj-fxz Date: Fri, 27 Sep 2024 14:39:51 +0800 Subject: [PATCH] fix llvm install bug --- maint/scripts/installation.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/maint/scripts/installation.sh b/maint/scripts/installation.sh index 01a3ab457..c3bb0fe0b 100755 --- a/maint/scripts/installation.sh +++ b/maint/scripts/installation.sh @@ -46,17 +46,20 @@ fi echo "Download and extraction completed successfully." -LLVM_CONFIG_PATH="${EXTRACT_PATH}/$(basename ${FILE_NAME} .tar.xz)/bin/llvm-config" +LLVM_CONFIG_PATH="$(realpath ${EXTRACT_PATH}/$(basename ${FILE_NAME} .tar.xz)/bin/llvm-config)" echo "LLVM config path: $LLVM_CONFIG_PATH" # clone and build tvm git submodule update --init --recursive cd 3rdparty/tvm +if [ -d build ]; then + rm -rf build +fi mkdir build cp cmake/config.cmake build cd build -echo "set(USE_LLVM $LLVM_CONFIG_PATH)" >> config.cmake && echo "set(USE_CUDA ON)" >> config.cmake +echo "set(USE_LLVM $LLVM_CONFIG_PATH)" >> config.cmake && echo "set(USE_CUDA /usr/local/cuda)" >> config.cmake cmake .. && make -j && cd ../../..