Tip: For an example of an embedded system
design that includes an AI Engine graph
application refer to Vitis-Tutorials/Developer_Contributed/01-Versal_Custom_Thin_Platform_Extensible_System/.
For Versal devices, the AI Engine graph application is an adaptive data flow (ADF) graph application. For more information on programming the AI Engine kernels and graph refer to AI Engine Kernel and Graph Programming Guide (UG1079).
The following is an example of how you would load and run the graph application from the software program.
- Add required header to
#include
statement:#include <experimental/xrt_aie.h>
- Set up the application environment as described in Specifying the Device ID and Loading the XCLBIN.
- Identify the AI Engine graph
from the
xrt::device
object, theuuid
of the loaded .xclbin, and thename
of the graph application:auto my_graph = xrt::graph(device, uuid, "mygraph_top");
- Reset and run the graph application from the software program as
needed:
my_graph.reset(); std::cout << STR_PASSED << "my_graph.reset()" << std::endl; my_graph.run(0); std::cout << STR_PASSED << "my_graph.run()" << std::endl;
The graph application (libadf.a) is packaged as part
of the device binary (.xclbin) by the v++ --package
command, and also copied to the SD card. For
more information refer to Compiling AI Engine Graph Applications.