-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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] Deprecate USE_HEXAGON_DEVICE, introduce USE_HEXAGON #11025
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
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).
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ ExternalProject_Add(x86_tvm_runtime_rpc | |
"-DUSE_LIBBACKTRACE=OFF" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't catch the motivation on introduction of |
||
"-DUSE_RPC=ON" | ||
"-DUSE_CPP_RPC=ON" | ||
"-DUSE_HEXAGON=ON" | ||
"-DUSE_HEXAGON_RPC=ON" | ||
"-DBUILD_STATIC_RUNTIME=ON" | ||
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" | ||
|
@@ -66,6 +67,7 @@ ExternalProject_Add(android_tvm_runtime_rpc | |
"-DUSE_LIBBACKTRACE=OFF" | ||
"-DUSE_RPC=ON" | ||
"-DUSE_CPP_RPC=ON" | ||
"-DUSE_HEXAGON=ON" | ||
"-DUSE_HEXAGON_RPC=ON" | ||
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" | ||
"-DUSE_ALTERNATIVE_LINKER=OFF" | ||
|
@@ -101,6 +103,7 @@ ExternalProject_Add(hexagon_tvm_runtime_rpc | |
"-DUSE_HEXAGON_ARCH=${USE_HEXAGON_ARCH}" | ||
"-DUSE_LIBBACKTRACE=OFF" | ||
"-DUSE_RPC=OFF" | ||
"-DUSE_HEXAGON=ON" | ||
"-DUSE_HEXAGON_RPC=ON" | ||
"-DBUILD_STATIC_RUNTIME=ON" | ||
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,15 +79,16 @@ ExternalProject_Add(static_hexagon_tvm_runtime | |
SOURCE_DIR "${TVM_SOURCE_DIR}" | ||
BUILD_COMMAND $(MAKE) runtime | ||
CMAKE_ARGS | ||
"-DBUILD_STATIC_RUNTIME=ON" | ||
"-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}" | ||
"-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}" | ||
"-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 commentThe reason will be displayed to describe this comment to others. Learn more. nit: Place USE_HEXAGON=ON before other hexagon cmake variable definitions |
||
"-DUSE_HEXAGON_SDK=${USE_HEXAGON_SDK}" | ||
"-DUSE_LIBBACKTRACE=OFF" | ||
"-DUSE_LLVM=OFF" | ||
"-DUSE_RPC=OFF" | ||
"-DBUILD_STATIC_RUNTIME=ON" | ||
"-DUSE_HEXAGON_SDK=${USE_HEXAGON_SDK}" | ||
INSTALL_COMMAND "" | ||
BUILD_ALWAYS 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.
Some TVM config options provide [ON|OFF|PATH_TO_SDK], with ON indicating to search for the SDK in common directories and fail otherwise.