Build issue for hexagon

Hi, I’m trying to get stuff in this article to work: TVM open source compiler now includes initial support for Qualcomm Hexagon DSP.

I compiled the entire tvm according to the install process on the official website.
USE_HEXAGON_DEVICE in config.cmake is set to sim.
The build process is OK, but there is an error when calling the compiled function.

As sim_dev tries to open, I added the path of to ADSP_LIBRARY_PATH. I’m not sure if this is correct. The thing is, sim_dev can find but cannot open it. Then I found sim_dev was built to 32bit while was built to 64 bit.

I also tried to set CFLAGS=-m64 in CMakeLists.txt of sim_dev,and the final compiled sim_dev executable is still 32bit.

I would like to know why this is happening and is there any way to compile it to 64bit?
The version of tvm I am using is 0.8 released on Github.

sim_dev was a Hexagon executable, it was executed by Hexagon simulator. All Hexagon executables are 32-bit. The that you’re looking at was built for x86, you’ll need to build the TVM runtime for Hexagon separately.

Btw, all of that has been removed in recent TVM (in the main branch). We have removed support for offload (which is what sim_dev was for). The Hexagon support has been expanded and also made simpler to use, so maybe you could switch to the latest TVM.

Thanks for reply. That really helps a lot.
I’ve tried with the latest TVM and it seems a little wired.

I set USE_HEXAGON to ON but it doesn’t seem to look for the hexagon toolchain when configuring.
So I’m wondering if there are some items I’m not setting in config.cmake, as there is no complete tutorial on hexagon.

There are some README files in the source tree: building, two apps used to run workloads on Hexagon here and here, plus some testing info.

Let us know if there is enough information there, if not, we’ll try to improve them.

I’ve found and looked into building and test earlier sometime.
For myself, if I dont set USE_HEXAGON_RPC=True in cmake, no hexagon related code will be compiled.
And this is not mentioned in your README files.

I followed test to do some tests.
In mentioned in this readme, I’m not really sure what hexagon_session is.
So in my own code I tried to generate one. image

I don’t know if this is what you intended, but so far it works.
Then I just try to generate some data and move them to the hexagon simulator, just like in the test file.

At this step, I got an error.
It seems to be caused by copying data to hexagon simulator.

I am still looking for the reason and I dont know if you have any clues.
Thanks again for your reply, it really helped me.

I‘ve create a new topic (simulator cpu arch) for my question…
Thanks for your help.