tvm
tvm copied to clipboard
[Bug] problem about building hexagon_launcher
Expected behavior
build hexagon_launcher successfully
Actual behavior
In file included from /media/psf/Home/workspace/open-codes/tvm/src/runtime/hexagon/hexagon_user_dma.cc:20:
In file included from /media/psf/Home/workspace/open-codes/tvm/src/runtime/hexagon/hexagon_user_dma.h:25:
/media/psf/Home/workspace/open-codes/tvm/src/runtime/hexagon/hexagon_user_dma_instructions.h:29:16: error: invalid instruction
asm volatile(" %0 = dmpause" : "=r"(dm0));
^
r2 = dmpause
^
In file included from /media/psf/Home/workspace/open-codes/tvm/src/runtime/hexagon/hexagon_user_dma.cc:20:
In file included from /media/psf/Home/workspace/open-codes/tvm/src/runtime/hexagon/hexagon_user_dma.h:25:
/media/psf/Home/workspace/open-codes/tvm/src/runtime/hexagon/hexagon_user_dma_instructions.h:33:48: error: invalid instruction
inline void dmstart(void* next) { asm volatile(" dmstart(%0)" : : "r"(next)); }
^
dmstart(r2)
^
In file included from /media/psf/Home/workspace/open-codes/tvm/src/runtime/hexagon/hexagon_user_dma.cc:20:
In file included from /media/psf/Home/workspace/open-codes/tvm/src/runtime/hexagon/hexagon_user_dma.h:25:
/media/psf/Home/workspace/open-codes/tvm/src/runtime/hexagon/hexagon_user_dma_instructions.h:36:16: error: invalid instruction
asm volatile(" dmlink(%0, %1)" : : "r"(tail), "r"(next));
^
dmlink(r3, r2)
^
In file included from /media/psf/Home/workspace/open-codes/tvm/src/runtime/hexagon/hexagon_user_dma.cc:20:
In file included from /media/psf/Home/workspace/open-codes/tvm/src/runtime/hexagon/hexagon_user_dma.h:25:
/media/psf/Home/workspace/open-codes/tvm/src/runtime/hexagon/hexagon_user_dma_instructions.h:41:16: error: invalid instruction
asm volatile(" %0 = dmpoll" : "=r"(dm0));
^
r2 = dmpoll
^
In file included from /media/psf/Home/workspace/open-codes/tvm/src/runtime/hexagon/hexagon_user_dma.cc:20:
In file included from /media/psf/Home/workspace/open-codes/tvm/src/runtime/hexagon/hexagon_user_dma.h:25:
/media/psf/Home/workspace/open-codes/tvm/src/runtime/hexagon/hexagon_user_dma_instructions.h:41:16: error: invalid instruction
asm volatile(" %0 = dmpoll" : "=r"(dm0));
^
r2 = dmpoll
^
In file included from /media/psf/Home/workspace/open-codes/tvm/src/runtime/hexagon/hexagon_user_dma.cc:20:
In file included from /media/psf/Home/workspace/open-codes/tvm/src/runtime/hexagon/hexagon_user_dma.h:25:
/media/psf/Home/workspace/open-codes/tvm/src/runtime/hexagon/hexagon_user_dma_instructions.h:41:16: error: invalid instruction
asm volatile(" %0 = dmpoll" : "=r"(dm0));
^
r2 = dmpoll
Environment
TVM: mian branch OS: ubuntu 18.04 Clang: 11.0.0 Hexagon_sdk: 4.5.0.3
And when building the hexagon_api, the problem is:
-- Looking for Hexagon toolchain in /local/mnt/workspace/Qualcomm/Hexagon_SDK/4.5.0.3
CMake Error at cmake/modules/HexagonSDK.cmake:184 (_get_hexagon_sdk_property_impl):
_get_hexagon_sdk_property_impl Function invoked with incorrect arguments
for function named: _get_hexagon_sdk_property_impl
Call Stack (most recent call first):
cmake/modules/Hexagon.cmake:140 (get_hexagon_sdk_property)
CMakeLists.txt:468 (include)
CMake Error at cmake/modules/HexagonSDK.cmake:184 (_get_hexagon_sdk_property_impl):
_get_hexagon_sdk_property_impl Function invoked with incorrect arguments
for function named: _get_hexagon_sdk_property_impl
Call Stack (most recent call first):
cmake/modules/Hexagon.cmake:140 (get_hexagon_sdk_property)
CMakeLists.txt:468 (include)
CMake Warning at cmake/modules/Hexagon.cmake:145 (message): Could not locate some Hexagon SDK components Call Stack (most recent call first): CMakeLists.txt:468 (include)
-- Looking for Hexagon toolchain in /local/mnt/workspace/Qualcomm/Hexagon_SDK/4.5.0.3/tools/HEXAGON_Tools/8.5.08/Tools/ CMake Error at cmake/modules/HexagonSDK.cmake:184 (_get_hexagon_sdk_property_impl): _get_hexagon_sdk_property_impl Function invoked with incorrect arguments for function named: _get_hexagon_sdk_property_impl Call Stack (most recent call first): cmake/modules/Hexagon.cmake:179 (get_hexagon_sdk_property) cmake/modules/Hexagon.cmake:225 (build_rpc_idl) CMakeLists.txt:468 (include)
@kparzysz-quic
try to delete the space in "",like [asm volatile(" dmlink(%0, %1)" : : "r"(tail), "r"(next));] to [asm volatile("dmlink(%0, %1)" : : "r"(tail), "r"(next));]
You are probably using a wrong compiler. It is recommended to use the Hexagon docker image to avoid issues like this.