The AI Engine
supports column-based partitions. This is enabled by creating independent graphs
that can be compiled and simulated separately. Each graph is mapped to a specific
column or a contiguous set of columns on the AI Engine array. During the v++
link stage, multiple partitions can be integrated together, provided
there is no overlap in the resource usage by the graphs in those partitions.
The following picture shows an example of AI Engine with multiple partitions.
A partition in the AI Engine array can be defined as <START_COLUMN>:<NUM_OF_COLUMN>:<PARTITION_NAME>, and
passed to the Vitis command line using v++ -c -mode aie --config <CONFIG_FILE.cfg>.
Example configuration (<CONFIG_FILE.cfg>):
[aie]
enable-partition=6:2:pr0
This configuration restricts the compiled graph to columns 6 and 7,
and names the partition pr0.
libadf0.a, libadf1.a…) are used at v++ link
time.v++ link will report
error about the conflict. enable-partition option is interpreted as a single
partition comprising the entire AI Engine array, which will overlap (i.e., conflict) with any
other partitions at v++ link time.v++ link command can link
multiple independent compilation results together; for
example:v++ -l --platform ${PLATFORM} -t hw --config system.cfg -o ${XSA} libadf0.a libadf1.a libadf2.a libadf3.a
[connectivity]
stream_connect=ai_engine_0.pr0_Dataout0:s2mm_1.s
stream_connect=datagen.out:ai_engine_0.pr0_Datain0
Dataout0 is renamed as pr0_Dataout0.
Thus, there are no conflicts with port names from other partitions. The v++ package command is called to
merge multiple compilation results together, such as:
v++ -p -t hw -f ${PLATFORM} \
--package.rootfs ${ROOTFS} \
--package.kernel_image ${IMAGE} \
--package.boot_mode=sd \
--package.image_format=ext4 \
--package.defer_aie_run \
--package.sd_file ${HOST_EXE} \
${XSA} \
libadf0.a libadf1.a libadf2.a libadf3.a
When specifying multiple libadf.a
files for v++ link and v++
package, make sure that they are specified with the same order, because
the order affects metadata generation and might impact the application execution.
For more information about how to package PL-only XCLBIN and AI Engine-Only XCLBIN for runtime control, refer to Generate AI Engine-only and PL-only XCLBIN.
For more information about how v++ works, see the Vitis Reference Guide (UG1702).
For more information about how to use XRT API to control and reload partitions in the host code, see Runtime Control and Reload of AI Engine Partitions.