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

[Hexagon] - Build the hexagon_remote runtime using cmake #7659

Closed
wants to merge 5 commits into from

Conversation

pranavb-ca
Copy link
Contributor

This PR builds the hexagon_remote runtime using CMake. This integrates the build of the hexagon_remote runtime into the Halide build if TARGET_HEXAGON is true.

  • I have tested this locally, but for the bots to test this effectively, we'll need to make changes to the bots themselves so that they export the right paths.
  • Once this is merged, we can remove the precompiled binaries that are in the repository at src/runtime/hexagon_remote/bin.
  • The host, src and v65 subdirectories are no longer present because their contents are unique and we wont really be storing binaries in the repository anymore anyway.

Since CMake is such a challenge for cross-compilation, please let me know if my approach is the right one.

@alexreinking
Copy link
Member

alexreinking commented Jun 23, 2023

Somehow Halide_Runtime needs to have a dependency on halide_hexagon_host, right? It doesn't link to it, but building Halide_Runtime should bring halide_hexagon_host up to date, too. Maybe via add_dependencies?

@alexreinking alexreinking added build Issues related to building Halide and with CI release_notes For changes that may warrant a note in README for official releases. labels Jun 23, 2023
@alexreinking
Copy link
Member

alexreinking commented Jun 23, 2023

It's also worth noting that this adds a build-time dependency to the Hexagon SDK. The README should be updated with instructions on how to do that. Naturally, our CI will need to either disable Hexagon (e.g. in GitHub Actions) or acquire the Hexagon SDK.

@alexreinking
Copy link
Member

For the parts that are cross-compiled with the Hexagon toolchain and then treated opaquely... I think those should be factored into a separate project, along with a toolchain file that points to the Hexagon clang compilers. It can be added to the primary build via ExternalProject. This is safe in this case because no matter the host or target system for libHalide, that code must always be compiled with the Hexagon toolchain.

@pranavb-ca
Copy link
Contributor Author

@alexreinking - Thank you for your review.
I am fine with the ExternalProject idea. Let me sync up with you offline to discuss this more. (I saw your PM about it and will follow up with you).
Also, the buildbots use the Hexagon Toolchain which they get from the SDK presently. So, the buildbots already use the HexagonSDK and so should have access to it in the context of this PR.

@alexreinking
Copy link
Member

Superseded by #7671

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues related to building Halide and with CI release_notes For changes that may warrant a note in README for official releases.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants