Working with AI Engine Graphs - 2022.2 English

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
Release Date
2022.2 English
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 AI Core devices, the AI Engine graph application is an xxx. 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. The following is an example of how you would load and run the graph application from the software program.

  1. Add required header to #include statement:
    #include <experimental/xrt_aie.h>
  2. Set up the application environment as described in Specifying the Device ID and Loading the XCLBIN.
  3. Identify the AI Engine graph from the xrt::device object, the uuid of the loaded .xclbin, and the name of the graph application:
      auto my_graph  = xrt::graph(device, uuid, "mygraph_top");
  4. Reset and run the graph application from the software program as needed:
      std::cout << STR_PASSED << "my_graph.reset()" << std::endl;;
      std::cout << STR_PASSED << "" << std::endl;
Tip: For more information on building and running AI Engine applications refer to Versal ACAP AI Engine Programming Environment User Guide (UG1076).