tvm icon indicating copy to clipboard operation
tvm copied to clipboard

[Bug] problem about building hexagon_launcher

Open linyv opened this issue 2 years ago • 2 comments

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));
^
:1:3: note: instantiated into assembly here
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)); }
^
:1:3: note: instantiated into assembly here
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));
^
:1:3: note: instantiated into assembly here
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));
^
:1:3: note: instantiated into assembly here
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));
^
:1:3: note: instantiated into assembly here
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));
^
:1:3: note: instantiated into assembly here
r2 = dmpoll

Environment

TVM: mian branch OS: ubuntu 18.04 Clang: 11.0.0 Hexagon_sdk: 4.5.0.3

linyv avatar Sep 09 '22 07:09 linyv

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)

linyv avatar Sep 14 '22 03:09 linyv

@kparzysz-quic

linyv avatar Sep 14 '22 03:09 linyv

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));]

qam1314 avatar Nov 10 '22 07:11 qam1314

You are probably using a wrong compiler. It is recommended to use the Hexagon docker image to avoid issues like this.

masahi avatar Dec 08 '22 08:12 masahi