mlc-llm
mlc-llm copied to clipboard
[Bug] Compiling the MLC from source is failed
🐛 Bug
I execute the following scripts (from https://llm.mlc.ai/docs/install/mlc_llm.html#install-mlc-packages) to build the MLC-llm from the source code, but it fails.
Script:
# clone from GitHub
git clone --recursive https://github.com/mlc-ai/mlc-llm.git && cd mlc-llm/
# create build directory
mkdir -p build && cd build
# generate build configuration
python3 ../cmake/gen_cmake_config.py
# build mlc_llm libraries
cmake .. && cmake --build . --parallel $(nproc) && cd ..
Error:
./mlc-llm/3rdparty/tvm/src/runtime/contrib/thrust/thrust.cu(92): error: namespace "thrust::cuda" has no member "par_nosync"
./mlc/mlc-llm/3rdparty/tvm/src/runtime/contrib/thrust/thrust.cu(110): error: no instance of overloaded function "thrust::copy" matches the argument list argument types are: (<error-type>, thrust::device_ptr<half>, thrust::device_ptr<half>, thrust::device_ptr<half>)
...
I suspect it may be related to the version of CUDA. Could you tell me which CUDA version has been successfully used for stable compilation?
My cuda version is: nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Wed_Sep_21_10:33:58_PDT_2022 Cuda compilation tools, release 11.8, V11.8.89 Build cuda_11.8.r11.8/compiler.31833905_0
Hi @fengerhu1, our thrust integration doesn't support CUDA < 12. You can either upgrade CUDA to at least 12, or open build/config.cmake
and change set(USE_THRUST ON)
to set(USE_THRUST OFF)
(which may hurt performance, though).
Yes, it works now, thanks!