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] Update hexagon API build instruction and cleanup hexagon_proxy_rpc #10068

Merged
merged 6 commits into from
Jan 28, 2022

Conversation

mehrdadh
Copy link
Member

This PR:

  • Updates documentation for building hexagon_api to run HexagonLauncher tests
  • Cleanup apps/hexagon_proxy_rpc since it was a temporary solution before hexagon_api.

@mehrdadh
Copy link
Member Author

@kparzysz-quic
Copy link
Contributor

What happens without this hack? Are you running into errors building the Android runtime? Is it because of a missing FastRPC header? I see that on this line you set the Hexagon device to target, try setting it to sim instead.

Copy link
Contributor

@kparzysz-quic kparzysz-quic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from the "hack", the rest LGTM. Thanks!

@mehrdadh
Copy link
Member Author

@kparzysz-quic thanks for the suggestion! Fixed it.

@mehrdadh
Copy link
Member Author

cc @Lunderberg

@@ -26,20 +26,38 @@ Here are the steps that are taken to prepare a runtime on a Hexagon device to te
- Build TVM library with Hexagon support for host machine.
- Build TVMRuntime library and C++ RPC server for host machine.

To build these pieces, you can use a cmake command as follow.
Note: before moving forward make sure to export Clang libraries to `LD_LIBRARY_PATH` and Hexagon toolchain to `HEXAGON_TOOLCHAIN`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few suggestions:

  • nitpick: "before moving forward" is an unusual phrasing in a file like this, and parsing it slowed down my reading a little bit. It might be more idiomatic to say something like, "First, ensure that ...".

  • For variables like these, sometimes people get confused regarding how deep into a directory structure the variables should point. It might help to give concrete examples to clarify that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added more details. thanks!

cd apps/hexagon_api
mkdir build
cd build
cmake -DUSE_ANDROID_TOOLCHAIN=/path/to/android-ndk/build/cmake/android.toolchain.cmake \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a personal opinion, but I'd be careful with this style. It's formatted as bash code, and the first few lines look like literal bash code. So some people (probably me included) will potentially copy this whole block and paste it into a terminal, without reading it carefully. That's a problem because the following lines aren't literal bash commands, but rather human-readable bash pseudocode.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you. Changed the style, PTAL.

cd tvm
mkdir build
cd build
cmake -DUSE_LLVM=/path/to/llvm/bin/llvm-config \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Same comment as above, regarding mixing literal bash code with bash pseudo-code in a bash-formatted code block.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed the style.

apps/hexagon_api/CMakeLists.txt Outdated Show resolved Hide resolved
@mehrdadh
Copy link
Member Author

@cconvey thanks for the review. I addressed your comments, PTAL.

Copy link
Contributor

@cconvey cconvey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good. I'm approving this to keep things moving along, but I may suggest some tweaks after we have more experience with this.

Copy link
Contributor

@Lunderberg Lunderberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Lunderberg Lunderberg merged commit 6a274af into apache:main Jan 28, 2022
@mehrdadh mehrdadh deleted the hexagon/hexagon_api branch January 28, 2022 22:55
sunggg pushed a commit to sunggg/tvm that referenced this pull request Jan 29, 2022
…oxy_rpc (apache#10068)

* Fix hexagon api build and Update Readme

* Cleanup hexagon_proxy_rpc

* Target Hack

* Remove hack

* address @cconvey comments

* remove the rest of proxy rpc
ylc pushed a commit to ylc/tvm that referenced this pull request Feb 16, 2022
…oxy_rpc (apache#10068)

* Fix hexagon api build and Update Readme

* Cleanup hexagon_proxy_rpc

* Target Hack

* Remove hack

* address @cconvey comments

* remove the rest of proxy rpc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants