-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Hexagon] Deprecate USE_HEXAGON_DEVICE, introduce USE_HEXAGON #11025
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
Conversation
The new cmake flag `USE_HEXAGON=[ON|OFF]` enables/disables Hexagon support in TVM and TVM runtime. It should be turned on _whenever_ Hexagon support is required, even when compiling TVM runtime for Hexagon itself. This is one in a series of commits intended to remove offload support, and make the whole-model support the default mode of operation. With `USE_HEXAGON_DEVICE` deprecated, offload runtime is not built anymore, so register `device_api.hexagon` to be same as `.v2` (presence of device API is taken as evidence of support for the device in TVM, so this step is necessary).
|
are you keeping |
|
Not really, I just broke the process up in a few steps:
Edit: The reason is that I didn't want to make too many changes at the same time, so that each commit is focused on a more-or-less one thing. |
csullivan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a few suggestions for future improvements
| "-DUSE_HEXAGON_ARCH=${USE_HEXAGON_ARCH}" | ||
| "-DCMAKE_CXX_STANDARD=14" | ||
| "-DUSE_HEXAGON_ARCH=${USE_HEXAGON_ARCH}" | ||
| "-DUSE_HEXAGON=ON" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Place USE_HEXAGON=ON before other hexagon cmake variable definitions
| tvm_option(ROCM_PATH "The path to rocm" /opt/rocm) | ||
| tvm_option(USE_HEXAGON_DEVICE "Build with Hexagon device support in TVM runtime" OFF) | ||
| tvm_option(USE_HEXAGON_SDK "Path to the Hexagon SDK root (required for Hexagon support in TVM runtime or for building TVM runtime for Hexagon)" /path/to/sdk) | ||
| tvm_option(USE_HEXAGON "Build with Hexagon support" OFF) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some TVM config options provide [ON|OFF|PATH_TO_SDK], with ON indicating to search for the SDK in common directories and fail otherwise.
| CMAKE_ARGS | ||
| "-DUSE_HEXAGON_TOOLCHAIN=${USE_HEXAGON_TOOLCHAIN}" | ||
| "-DCMAKE_CXX_STANDARD=14" | ||
| "-DUSE_LIBBACKTRACE=OFF" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't catch the motivation on introduction of hexagon_api earlier this year, but to add to the backlog it would be nice if the hexagon_api was built automatically as part of a USE_HEXAGON=ON build. It's easy for users to forget to recompile the hexagon_api after making changes and only rebuilding tvm.
mehrdadh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
…#11025) The new cmake flag `USE_HEXAGON=[ON|OFF]` enables/disables Hexagon support in TVM and TVM runtime. It should be turned on _whenever_ Hexagon support is required, even when compiling TVM runtime for Hexagon itself. This is one in a series of commits intended to remove offload support, and make the whole-model support the default mode of operation. With `USE_HEXAGON_DEVICE` deprecated, offload runtime is not built anymore, so register `device_api.hexagon` to be same as `.v2` (presence of device API is taken as evidence of support for the device in TVM, so this step is necessary).
…#11025) The new cmake flag `USE_HEXAGON=[ON|OFF]` enables/disables Hexagon support in TVM and TVM runtime. It should be turned on _whenever_ Hexagon support is required, even when compiling TVM runtime for Hexagon itself. This is one in a series of commits intended to remove offload support, and make the whole-model support the default mode of operation. With `USE_HEXAGON_DEVICE` deprecated, offload runtime is not built anymore, so register `device_api.hexagon` to be same as `.v2` (presence of device API is taken as evidence of support for the device in TVM, so this step is necessary).
The new cmake flag
USE_HEXAGON=[ON|OFF]enables/disables Hexagon support in TVM and TVM runtime. It should be turned on whenever Hexagon support is required, even when compiling TVM runtime for Hexagon itself.This is one in a series of commits intended to remove offload support, and make the whole-model support the default mode of operation.
With
USE_HEXAGON_DEVICEdeprecated, offload runtime is not built anymore, so registerdevice_api.hexagonto be same as.v2(presence of device API is taken as evidence of support for the device in TVM, so this step is necessary).cc @mehrdadh