1919## Compilation
2020
2121The launcher consists of two parts: part running on Hexagon, and part running
22- on Android. Each component must be compiled separately.
22+ on Android. Each component must be compiled separately.
2323
2424The supported Snapdragon architectures are 855, 865, and 888.
2525
@@ -37,9 +37,9 @@ Building the Hexagon launcher application as a component of the main TVM build
3737used for Hexagon codegen can be achieved by setting ` USE_HEXAGON_LAUNCHER=ON ` .
3838This option will compile core tvm, the android launcher binary and its corresponding
3939tvm_runtime, as well as the Hexagon launcher shared library and its corresponding
40- tvm_runtime. As described in the [ Manual compilation] (#Manual compilation) section
41- each component requires Hexagon and android dependencies. When building the launcher
42- along with TVM these configurations must be providing when invoking cmake. A minimal
40+ tvm_runtime. As described in the [ Manual compilation] (#Manual compilation) section
41+ each component requires Hexagon and android dependencies. When building the launcher
42+ along with TVM these configurations must be providing when invoking cmake. A minimal
4343example invocation for compiling TVM along with the Hexagon launcher is included below:
4444
4545```
@@ -59,9 +59,9 @@ cmake -DCMAKE_C_COMPILER=/path/to/clang \
5959```
6060
6161where ` v65|v66|v68 ` means "one of" these architecture versions.
62- The Hexagon launcher application is an android binary and thus requires the use
63- of an android toolchain for compilation. Similarly, the Hexagon tvm runtime
64- requires the use of the Hexagon toolchain and depends on the Hexagon SDK. The
62+ The Hexagon launcher application is an android binary and thus requires the use
63+ of an android toolchain for compilation. Similarly, the Hexagon tvm runtime
64+ requires the use of the Hexagon toolchain and depends on the Hexagon SDK. The
6565resulting hexagon launcher binaries can be found in the ` apps_hexagon_launcher `
6666subdirectory of the cmake build directory. Please note that the above command
6767will not build support for Hexagon codegen in the TVM library, for that please
@@ -70,7 +70,7 @@ additionally define the `USE_HEXAGON_DEVICE` variable. Also, the LLVM used in
7070
7171### Manual compilation
7272
73- Since some source files are shared between the Hexagon and android builds,
73+ Since some source files are shared between the Hexagon and android builds,
7474make sure to delete all object files between compilations. Compile the Hexagon
7575code first.
7676
@@ -157,7 +157,7 @@ mod, params = relay.frontend.from_tflite(
157157
158158target = tvm.target.hexagon('v68', link_params=True)
159159with tvm.transform.PassContext(opt_level=3):
160- lib = relay.build(mod, target, target_host =target, params=params, mod_name="default")
160+ lib = relay.build(mod, tvm. target.Target(target, host =target) , params=params, mod_name="default")
161161
162162# Save model.so and model.json:
163163with open('model.json', 'w') as f:
0 commit comments