Aiecompiler to Vitis Command Line Interface Migration - 2024.1 English

AI Engine Tools and Flows User Guide (UG1076)

Document ID
UG1076
Release Date
2024-06-27
Version
2024.1 English

Using the v++ CLI

The AI Engine applications developed to compile using the aiecompiler command must be migrated to use the Vitis CLI (v++ -c --mode aie) to support AI Engine partitions and independent compilation and linking of ADF graphs. and this section describes the procedure to migrate using an example.

Consider the following aiecompiler command.

aiecompiler --include="<Vitis Installation Path>/20XX.X/aietools/include" --stacksize=512 --include="./aie" --include="./data" --include="./aie/kernels" --include="./" --platform <PLATFORM_REPO_PATHS>/xilinx_vck190_base_20XXX0_1/xilinx_vck190_base_20XXX0_1.xpfm --workdir=./Work --target=hw aie/graph.cpp

You can convert the above command to use unified CLI as shown below.

v++ -c --mode aie --include="<Vitis Installation Path>/20XX.X/aietools/include" --aie.stacksize=512 --include="./aie" --include="./data" --include="./aie/kernels" --include="./" --platform <PLATFORM_REPO_PATHS>/xilinx_vck190_base_20XXX0_1/xilinx_vck190_base_20XXX0_1.xpfm --aie.work_dir=./Work --target=hw aie/graph.cpp

Here:

  • v++ -c --mode aie is the unified CLI compile option.
  • Some generic options, such as --include, and --platform, are common across different v++ compile modes (for example, v++ -c --mode hls).
  • The option –stacksize=512 is specific to the aie mode. So, in the unified CLI command you need to prefix the option with –aie. as in:

    –aie.stacksize=512

Note: The –-aie.work_dir option in the unified CLI command is the equivalent option to the –workdir in the aiecompiler command.

Using the v++ Configuration File

Using the same example as the previous section, aiecompiler --export-config=aiecompiler.cfg <Arguments to export> can be used to generate a aiecompiler.cfg which can be used by the v++ command. That file is passed to the v++ command using --config option as shown below.

v++ -c --mode aie --config aiecompiler.cfg --target=hw aie/graph.cpp

A sample aiecompiler.cfg file is shown below. The first two commented lines show the corresponding v++ and aiecompiler commands as reference.

# v++ command: v++ -c --mode aie --config aiecompiler.cfg aie/graph.cpp

# aiecompiler command: aiecompiler --include=<Vitis Installation Path>/20XX.X/aietools/include --include=./aie --include=./data --include=./aie/
kernels --include=./ --target=hw --platform=<PLATFORM_REPO_PATHS>/xilinx_vck190_base_20XXX0_1/xilinx_vck190_base_20XXX0_1.xpfm --stacksize=512 
--workdir=./Work  aie/graph.cpp

# current directory: "<Current directory>"
include=<Vitis Installation Path>/20XX.X/aietools/include
include=./aie
include=./data
include=./aie/kernels
include=./
target=hw
platform=<PLATFORM_REPO_PATHS>/xilinx_vck190_base_20XXX0_1/xilinx_vck190_base_20XXX0_1.xpfm

[aie]
stacksize=512
workdir=./Work
Note: The AI Engine specific options are added under the section [ aie ].