주요 콘텐츠

Code Generation Configuration

The model configuration parameters for code generation define how the code generator produces code and builds an executable from your model.

Toolchain

You can select one of the two options available under Configuration Parameters > Code Generation > Toolchain:

  • Call the Hexagon-specific LLVM compiler directly by selecting Qualcomm(R) Hexagon(TM) LLVM C/C++ Compiler.

  • Use CMake along with the Hexagon LLVM complier by selecting Qualcomm(R) Hexagon(TM) LLVM C/C++ Compiler | CMake/Ninja

Build Configuration

The Build configuration parameter specifies compiler optimization or debug settings for the specified toolchain.

  • Faster Builds - Optimizes for shorter build times.

  • Faster Runs - Optimizes for executable program that runs faster. For Qualcomm Hexagon Processors, it is recommended to set the Build Configuration to Faster Runs.

  • Debug - Optimizes for debugging.

  • Specify - Displays a table of tools with editable options. Use the table to customize settings for the current model. See Toolchain details. This interaction helps synchronize the Toolchain value and Build configuration settings that you specify manually.

  • Release - Enables optimizations in the build. This setting is the default for toolchains that use CMake. This setting is only available for toolchains that use CMake.

  • RelWithDebInfo - Enables optimizations and generates debug symbols. This setting is only available for toolchains that use CMake.

  • MinSizeRel - Optimizes build for size and does not generate debug symbols. This setting is only available for toolchains that use CMake.

Code Replacement Libraries

Libraries that define code optimizations for specific target environment.

Open Configuration Parameters and navigate to Code Generation > Interface and set Code Replacement libraries to Qualcomm Hexagon QHL or Qualcomm Hexagon HVX or both.

Profiling

Measure execution times and generate metrics for tasks in generated code. Enable the code execution profiling to perform profiling through PIL.

Open Configuration Parameters and navigate to Code Generation > Verification > Code execution profiling and set Measure function execution time to Off.

Code Generation Optimization Using Instruction Set Extension (ISE)

For Hexagon Vector eXtension (HVX), you can select the option to leverage target hardware instruction set extension (ISE). Selecting the HVX option for instruction set extension allows SIMD (Single Instruction, Multiple Data) code generation, which helps to improve the overall performance when you deploy code to Qualcomm Hexagon Android or Qualcomm Hexagon Linux boards. The SIMD code generation is supported for both floating point and fixed point integer (16-bit and 32-bit) operations. Additionally, you can enable the option to optimize reductions for HVX, along with enabling optional support for the fused multiply-add (FMA) extension.

See Also

Topics