Compiling using v++ (Unified Compiler) - 2024.2 English - UG1076

AI Engine Tools and Flows User Guide (UG1076)

Document ID
UG1076
Release Date
2024-11-28
Version
2024.2 English

AMD provides a standalone command line utility v++ -c --mode aie to compile the AI Engine graph and generate the libadf.a file for use in simulation, emulation, and hardware flows. The AMD Vitis™ Unified IDE uses the v++ -c --mode aie command line to compile the AI Engine graph code for either x86simulator or aiesimulator based on the target of the compilation process.

The v++ -c --mode aie command takes the graph, platform or part, and compiler options as inputs which can be either specified directly as part of the command or in a config file by adding --config <my_settings>.cfg argument.
Tip: Multiple config file arguments are allowed, with the first occurrence overruling any proceeding duplicate settings. It can be helpful to include common settings in the first config file, and application specific settings in a second config file.
In addition, thev++ -c --mode aie command supports AI Engine partitions and independent compilation and linking of ADF graphs into disjoint partitions.
The configuration file can contain a variety of options ranging from general compilation options like include and target, which are generic to different compilation modes. AI Engine compilation specific options are listed in the next section.
Note: For the complete list of v++ General Compilation Options, see v++ General Compilation Options in the Vitis Reference Guide (UG1702).
Tip: To access the command help, enter v++ -c --mode aie --help.

The contents of a configuration file can vary, but the sample aiecompiler.cfg file shown below uses the following commands.

include=<VITIS_INSTALL_PATH>/Vitis/2024.2/aietools/include
include=./aie
include=./data
include=./aie/kernels
include=./
platform= xilinx_vck190_base_202420_1.xpfm
target=hw

[AIE]
Xelfgen=-j4
workdir=./Work_3
Xmapper=DisableFloorplanning
output-archive=libadf_1.a

The options under the [AIE] section are applicable only to the AI Engine compilation. The following sections describe the v++ -c --mode aie command usage with an example and an insight on different AI Engine compile options which can be used in the configuration file.

File and Directory Names

File and Directory Names

The set of acceptable characters in file and directory names include as follows:

  • Letters (a-z A-Z)
  • Digits (0-9)
  • Underscore (_)
  • Hyphen
  • Space
  • Dot (.)

In addition:

  • The name must contain at least one letter or number.
  • The name must start with a letter or number.
  • The name cannot end with a dot or space.