halide / Halide

a language for fast, portable data-parallel computation
https://halide-lang.org
Other
5.78k stars 1.07k forks source link

How to build libsim_qurt.a by myself? #8286

Open jxl1080 opened 3 weeks ago

jxl1080 commented 3 weeks ago

Hi,

After I downloaded the source code of Halide, I noticed there is a pre-compiled libsim_qurt.a in Halide/src/runtime/hexagon_remote/bin/v65. If I want to build this lib from source code by myself, how can I do that?

Thank you!

abadams commented 3 weeks ago

I think this artifact is supposed to be built via this Makefile: src/runtime/hexagon_remote/Makefile

But it needs the hexagon SDK installed, which is why it's checked in as pre-built.

jxl1080 commented 3 weeks ago

I think this artifact is supposed to be built via this Makefile: src/runtime/hexagon_remote/Makefile

But it needs the hexagon SDK installed, which is why it's checked in as pre-built.

Thank you Andrew! If I use the pre-built libsim_qurt.a but my hexagon SDK is not the same version as the one used to build this libsim_qurt.a, is it going to give me a problem?

Best

abadams commented 3 weeks ago

I'm honestly not sure. @aankit-ca ?

jxl1080 commented 2 weeks ago

I think this artifact is supposed to be built via this Makefile: src/runtime/hexagon_remote/Makefile

But it needs the hexagon SDK installed, which is why it's checked in as pre-built.

@abadams Hi Andrew, should I change directory into the folder of that Makefile and do 'make all' over there? I tried that, but I don't see libsim_qurt.a dumped anywhere.

alexreinking commented 1 week ago

If you have the Hexagon SDK installed, you should be able to set Halide_BUILD_HEXAGON_REMOTE_RUNTIME=ON in the main CMake build. That's how Qualcomm does it. See #7659 -> #7671 -> #7741 (it went through a few revisions, but that's the full history).