mlc-ai / relax

Apache License 2.0
151 stars 77 forks source link

[Bug] TVM build failed on aarch64 (RK3588 / Orange Pi 5+) #320

Open av1d opened 6 months ago

av1d commented 6 months ago

Expected behavior

built TVM runtime

Actual behavior

av1d@ubuntu:~/mlc-llm/tvm_unity/build$ cmake .. && cmake --build . --target runtime --parallel $(nproc) && cd ../..
CMake Error at build/config.cmake:478:
  Parse error.  Expected a command name, got unquoted argument with text
  "\nset".
Call Stack (most recent call first):
  CMakeLists.txt:18 (include)

-- Configuring incomplete, errors occurred!

Environment

Ubuntu 22.04.3, Python 3.11.0rc1, cmake version 3.22.1, latest TVM, RK3588

Steps to reproduce

# clone from GitHub
git clone --recursive https://github.com/mlc-ai/relax.git tvm_unity && cd tvm_unity/
# create build directory
mkdir -p build && cd build
# generate build configuration
cp ../cmake/config.cmake . && echo "set(CMAKE_BUILD_TYPE RelWithDebInfo)\nset(USE_OPENCL ON)" >> config.cmake
# build `TVM runtime`
cmake .. && cmake --build . --target runtime --parallel $(nproc) && cd ../..

Triage

3pichaxz0r commented 2 months ago

edit you config.cmake file, you'll see \nset instead of a new line break. Replace it with a new line break