Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Hexagon Graph Launcher hexagon part build error #14407

Closed
GofranChang opened this issue Mar 27, 2023 · 2 comments
Closed

[Bug] Hexagon Graph Launcher hexagon part build error #14407

GofranChang opened this issue Mar 27, 2023 · 2 comments
Labels
needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug

Comments

@GofranChang
Copy link

When I try to compile the hexagon part of the hexagon graph launch, I get the following error:

In file included from /home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma.cc:20:
In file included from /home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma.h:25:
/home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma_instructions.h:29:16: error: invalid instruction
  asm volatile("%0=dmpause" : "=r"(dm0));
               ^
<inline asm>:1:2: note: instantiated into assembly here
        r2=dmpause
        ^
In file included from /home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma.cc:20:
In file included from /home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma.h:25:
/home/host/Documents/workspace/opensource/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)); }
                                               ^
<inline asm>:1:3: note: instantiated into assembly here
         dmstart(r21)
         ^
In file included from /home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma.cc:20:
In file included from /home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma.h:25:
/home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma_instructions.h:36:16: error: invalid instruction
  asm volatile(" dmlink(%0, %1)" : : "r"(tail), "r"(next));
               ^
<inline asm>:1:3: note: instantiated into assembly here
         dmlink(r2, r21)
         ^
In file included from /home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma.cc:20:
In file included from /home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma.h:25:
/home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma_instructions.h:41:16: error: invalid instruction
  asm volatile(" %0 = dmpoll" : "=r"(dm0));
               ^
<inline asm>:1:3: note: instantiated into assembly here
         r2 = dmpoll
         ^
In file included from /home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma.cc:20:
In file included from /home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma.h:25:
/home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma_instructions.h:41:16: error: invalid instruction
  asm volatile(" %0 = dmpoll" : "=r"(dm0));
               ^
<inline asm>:1:3: note: instantiated into assembly here
         r2 = dmpoll
         ^
In file included from /home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma.cc:20:
In file included from /home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma.h:25:
/home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma_instructions.h:41:16: error: invalid instruction
  asm volatile(" %0 = dmpoll" : "=r"(dm0));
               ^
<inline asm>:1:3: note: instantiated into assembly here
         r2 = dmpoll
         ^
In file included from /home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma.cc:20:
In file included from /home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma.h:25:
/home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma_instructions.h:29:16: error: invalid instruction
  asm volatile("%0=dmpause" : "=r"(dm0));
               ^
<inline asm>:1:2: note: instantiated into assembly here
        r2=dmpause
        ^
In file included from /home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma.cc:20:
In file included from /home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma.h:25:
/home/host/Documents/workspace/opensource/tvm/src/runtime/hexagon/hexagon_user_dma_instructions.h:29:16: error: invalid instruction
  asm volatile("%0=dmpause" : "=r"(dm0));
               ^
<inline asm>:1:2: note: instantiated into assembly here
        r2=dmpause
        ^
8 errors generated.
CMakeFiles/tvm_runtime_objs.dir/build.make:677: recipe for target 'CMakeFiles/tvm_runtime_objs.dir/src/runtime/hexagon/hexagon_user_dma.cc.o' failed
make[6]: *** [CMakeFiles/tvm_runtime_objs.dir/src/runtime/hexagon/hexagon_user_dma.cc.o] Error 1
CMakeFiles/Makefile2:117: recipe for target 'CMakeFiles/tvm_runtime_objs.dir/all' failed
make[5]: *** [CMakeFiles/tvm_runtime_objs.dir/all] Error 2
CMakeFiles/Makefile2:231: recipe for target 'CMakeFiles/runtime.dir/rule' failed
make[4]: *** [CMakeFiles/runtime.dir/rule] Error 2
Makefile:235: recipe for target 'runtime' failed
make[3]: *** [runtime] Error 2
CMakeFiles/static_hexagon_tvm_runtime.dir/build.make:85: recipe for target 'static_hexagon_tvm_runtime-prefix/src/static_hexagon_tvm_runtime-stamp/static_hexagon_tvm_runtime-build' failed
make[2]: *** [static_hexagon_tvm_runtime-prefix/src/static_hexagon_tvm_runtime-stamp/static_hexagon_tvm_runtime-build] Error 2
CMakeFiles/Makefile2:110: recipe for target 'CMakeFiles/static_hexagon_tvm_runtime.dir/all' failed
make[1]: *** [CMakeFiles/static_hexagon_tvm_runtime.dir/all] Error 2
Makefile:90: recipe for target 'all' failed
make: *** [all] Error 2

OS: Ubuntu 20.04
Hexagon SDK Version : 4.5.0.3
Hexagon Tool Version : 8.5.08

@GofranChang GofranChang added needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug labels Mar 27, 2023
@mason20240920
Copy link

Just change your argument -DUSE_HEXAGON_ARCH=v65 to v68 or after, cause hexagon don't support v65 func

@tqchen tqchen closed this as completed May 27, 2024
@chayliu-ecarx
Copy link

chayliu-ecarx commented Jul 16, 2024

I met the same problem for v66 while using Hexagon_SDK_4_5.

error such as :
hexagon_user_dma_instructions.h:29:16: error: invalid instruction
asm volatile(" %0 = dmpause" : "=r"(dm0));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug
Projects
None yet
Development

No branches or pull requests

4 participants