Deploying the AI Engine Graph - 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 Vitis design execution model has multiple considerations that impact how the AI Engine graph is loaded onto the board, run, reset, and reloaded. Depending on the needs of the application you have a choice of loading the AI Engine graph at board boot up time, or using the PS host application. In addition, you can also control running the graph as soon as the graph is loaded or defer it to a later time. You also have the option of running the graph infinitely or for a fixed number of iterations or cycles.

AI Engine Graph Load and Run

The AI Engine graph can be loaded and run immediately at boot, or it can be loaded by the host PS application. Additionally, you also have the option of deferring the running of the graph after the graph has been loaded using the graph.run() host API XRT call.

By default, the AMD platform management controller (PMC) loads the graph from the PDI and runs the graph immediately after loading. However the v++ --package.defer_aie_run command will let you defer the graph run until after the graph has been loaded using the graph.run() API call in the PS application. The following table lists the deployment options.

Table 1. Deploying the AI Engine Graph
Run Forever Host Control
By default the graph is enabled in the PDI (device binary) and the graph runs until the system exits

Specify v++ --package.defer_aie_run command when packaging the system to prevent the AI Engine graph application from starting at boot-up.

Enable the graph as needed from the PS application using graph.run()

AI Engine Run Iterations

By default, the AI Engine graph application runs indefinitely. However, it can be made to run for a limited number of iterations. Use the graph.run(run_iterations) or graph.end(cycles) to limit the number of graph runs to a specific number of iterations or for a specific number of clock cycles. See Run-Time Graph Control API in AI Engine Kernel and Graph Programming Guide (UG1079).