AI Engine Options - 2024.1 English

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
UG1393
Release Date
2024-07-03
Version
2024.1 English

The following options apply to the AI Engine compilation process.

constraints

Constraints (location, bounding box, etc.) can be specified using a JSON file. This option lets you specify one or more constraint files.

constraints=constraints.json
heapsize

Heap size (in bytes) used by each AI Engine

In an AI Engine, the size of the heap determines the maximum amount of memory that can be dynamically allocated at any given time.

The heap size for each AI Engine is measured in bytes, and by default, the size is set at 1024 bytes.

The stack, heap, and sync buffer (sync buffer is a memory of size 32 bytes, used to store graph run iteration information) are allocated up to the tile data memory. Before changing the heap size to a different value, ensure that the sum of the stack, heap, and sync buffer sizes does not exceed the tile data memory, for example, 32768 bytes in AI Engine device.

This option is also used for allocating any remaining file-scoped data that is not explicitly connected in the user graph.

heapsize=512
log-level

Log level for verbose logging. Only applicable when used with verbose. The specified range can be from 0 to 5, with increasing details provided in the log file as the number increases.

  • 0 is the same as the quiet option
  • 1 is the default logging of the compiler
  • 2 is the default logging specified with verbose
  • 3 - 5 are increased logging details when used with verbose
log-level=4
pl-freq

Specifies the interface frequency (in MHz) for all PL kernels and PLIOs. The default frequency is a quarter of the AI Engine clock frequency, and the maximum frequency is half of the AI Engine clock frequency. The PL frequency specific to each interface can be explicitly provided in the graph.

 pl-freq=500
pl-register-threshold

Specifies the frequency (in MHz) threshold for registered AI Engine-PL crossings. The default frequency is one-eighth of the AI Engine clock frequency.

 pl-register-threshold=300
Note: For more details, regarding the use of this setting, see AI Engine Kernel and Graph Programming Guide (UG1079) .
Important: Values above a quarter of the AI Engine array frequency are ignored, and a quarter is used instead.
stacksize

Stack size (in bytes) used by each AI Engine tile. The default stack size is set to 1024 bytes. Used as a standard compiler calling convention including stack-allocated local variables and register spilling.

The stack is a region of memory used by programs to store temporary data during execution. In the case of an AI Engine, every tile relies on a specific amount of stack memory to run the kernel mapped to it. The amount of memory allocated as stack space is measured by the number of bytes assigned to each tile. This size of the stack is an essential consideration when designing and optimizing the performance of the AI Engine.

By default, the stack size for each tile is set at 1024 bytes. This value, takes into account factors like stack-allocated local variables and register spilling, which occur when a register no longer has room for data, so it is "spilled" onto the stack temporarily to free up register space. It is essential to optimize the stack size for each tile to prevent potential issues that could arise, such as memory overflows, which can lead to errors and other performance problems.

Tip: The stack, heap, and sync buffer (32 bytes) are allocated up to 32768 bytes of data memory. Before changing the stack size to a different value, ensure that the sum of the stack, heap, and sync buffer sizes does not exceed 32768 bytes.
stacksize=512