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 compilation on MacOS system #14308

Merged
merged 2 commits into from
Mar 22, 2023

Conversation

apeskov
Copy link
Contributor

@apeskov apeskov commented Mar 15, 2023

Short desc
This changes allow my to compile and tune models for hexagon directly from my macOS laptop without full switching to linux environment.

List of changes

  • Replace local linker call with call from docker container with Hexagon SDK. Yes, that is the only SDK tool used by TVM during compilation.
  • Enhanced search of ADB. Not only in PATH, but also in ANDROID_HOME, ANDROID_SDK_ROOT and default sdk installation directory. Mac OS doesn't allow to easily change default PATH env var for UI application launched from dock bar. So adb is not available for IDE by default.

Motivation
Some engineers would like to continue work with comfortable macOS environment even if they have to play with hexagon devices. At this moment there is no official Hexagon SDK for macOS system. Alternatives are next: fully switch to remote linux, use local linux virtual machine or try to introduce required hexagon SDK functionality for macOS. The last option is more preferable to me.

@tvm-bot
Copy link
Collaborator

tvm-bot commented Mar 15, 2023

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

  • No users to auto-tag found, no teams are specified in PR title See #10317 for details

Generated by tvm-bot

@mehrdadh mehrdadh requested a review from kparzysz-quic March 15, 2023 16:44
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you either merge this code into tools.py or rename this file to tools_macos.py?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, as you wish. File name "tools_macos.py" doesn't look like perfect match with content, so I moved it to "tools.py".

python/tvm/tir/schedule/schedule.py Outdated Show resolved Hide resolved
apeskov added 2 commits March 21, 2023 14:17
Signed-off-by: Alexander Peskov <peskovnn@gmail.com>
@apeskov apeskov force-pushed the ap/macos-hex-build-tools branch from c0a44cb to b74fd34 Compare March 21, 2023 10:18
@mehrdadh mehrdadh merged commit 46fb2ff into apache:main Mar 22, 2023
@apeskov apeskov deleted the ap/macos-hex-build-tools branch March 27, 2023 11:43
@FdyCN
Copy link

FdyCN commented Jan 3, 2024

Short desc This changes allow my to compile and tune models for hexagon directly from my macOS laptop without full switching to linux environment.

List of changes

  • Replace local linker call with call from docker container with Hexagon SDK. Yes, that is the only SDK tool used by TVM during compilation.
  • Enhanced search of ADB. Not only in PATH, but also in ANDROID_HOME, ANDROID_SDK_ROOT and default sdk installation directory. Mac OS doesn't allow to easily change default PATH env var for UI application launched from dock bar. So adb is not available for IDE by default.

Motivation Some engineers would like to continue work with comfortable macOS environment even if they have to play with hexagon devices. At this moment there is no official Hexagon SDK for macOS system. Alternatives are next: fully switch to remote linux, use local linux virtual machine or try to introduce required hexagon SDK functionality for macOS. The last option is more preferable to me.

@apeskov Is there any ReadME.md to follow?I am a newbee in Hexagon, and i don't know how to use them. thanks a lot.

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.

5 participants