Introduction to Graph Programming - 2024.1 English

AI Engine Kernel and Graph Programming Guide (UG1079)

Document ID
UG1079
Release Date
2024-06-05
Version
2024.1 English

An AI Engine program must include a Data Flow Graph Specification written in C++. An adaptive data flow (ADF) graph is a network with a single AI Engine kernel or multiple AI Engine kernels connected by data streams. The graph can interact with the programmable logic (PL), global memory, and/or the host processor using specific constructs. input_plio and output_plio port objects can be used to establish stream connections to or from the programmable logic, input_gmio and output_gmio port objects can be used to establish memory-mapped connections to or from the global memory, and RTP (Runtime Parameter) objects can be used to setup and control parameters required by the kernels during graph execution.

A graph can have multiple kernels, input and output ports. The graph connectivity, which is equivalent to the nets in a data flow graph is either between the kernels, between kernel and input ports, or between kernel and output ports, and can be configured as a connection. A graph executes when all the data samples equaling the buffer or stream of data expected by the kernels in the graph become available, and produces data samples equaling the buffer or stream of data expected at the output of all the kernels in the graph.

As described in C++ Template Support you can use template classes or functions for writing the AI Engine graph or kernels. The application can be compiled and executed using the AI Engine tool chain. This chapter provides an introduction to writing an AI Engine program.

The example that is used in this chapter can be found as a template example in the AMD Vitis™ environment when creating a new AI Engine project.