[Hexagon] Deprecate USE_HEXAGON_DEVICE, introduce USE_HEXAGON#11025
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.
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.
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.
Some TVM config options provide [ON|OFF|PATH_TO_SDK], with ON indicating to search for the SDK in common directories and fail otherwise.
| @@ -35,6 +35,7 @@ ExternalProject_Add(x86_tvm_runtime_rpc | |||
| "-DUSE_LIBBACKTRACE=OFF" | |||
There was a problem hiding this comment.
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.
…#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