[Hexagon] Tighten requirements on inclusion of runtime sources - #11635
Conversation
are included in the runtime build. Specifically only include them when building for hexagon rpc on hardware and do not include them for x86 (host, simulator) or android builds.
Co-authored-by: Adam Straw <astraw@octoml.ai> Co-authored-by: Karl Koscher <kkoscher@octoml.ai>
| endfunction() | ||
|
|
||
| if(BUILD_FOR_HEXAGON OR USE_HEXAGON_RPC) | ||
| if(BUILD_FOR_HEXAGON OR ("${USE_HEXAGON_RPC}" STREQUAL "HEXAGON")) |
There was a problem hiding this comment.
When would BUILD_FOR_HEXAGON be false, but USE_HEXAGON_RPC be "HEXAGON"? It seems like the latter implies the former...
There was a problem hiding this comment.
BUILD_FOR_HEXAGON is false for the runtime android and x86 build targeted by the hexagon_api, and USE_HEXAGON_RPC is true for these cases. Thus I want to tighten the requirement so that hexagon sources are not brought in to the tvm_runtime builds (initiated by the hexagon_api cmake) when we aren't building for hexagon.
There was a problem hiding this comment.
What I mean is that it seems that (${USE_HEXAGON_RPC} == "HEXAGON") => BUILD_FOR_HEXAGON. Unless I'm missing something, you can just remove USE_HEXAGON_RPC from x86/android builds (and also from this check).
There was a problem hiding this comment.
I tested with if(BUILD_FOR_HEXAGON) and it appears to work at least for PR #11653 which depends on this PR to pass CI.
There was a problem hiding this comment.
We may be able to "remove USE_HEXAGON_RPC from x86/android builds" in hexagon_api/CMakeLists.txt as @kparzysz-quic suggests but I am getting some strange results when doing so. I reverted the changes to that file in this PR.
Changing to if(BUILD_FOR_HEXAGON) and removing the API check works and accomplishes the original intent of the PR.
kparzysz-quic
left a comment
There was a problem hiding this comment.
Let's unblock dependent PRs. We can refine this later if necessary.
Only include Hexagon runtime sources when building for hexagon rpc on hardware and do not include them
for x86 (host, simulator) or android builds.
Duplicate of #11595.
cc @mehrdadh