Advanced Programming Interface - 1.1 English

Vitis AI User Guide (UG1414)

Document ID
UG1414
Release Date
2020-03-23
Version
1.1 English

For edge DPU, Vitis AI offers the advanced low-level C++/Python programming APIs. It consists of a comprehensive set of APIs that can flexibly meet the diverse requirements under various edge scenarios. For example, low-level API dpuSetTaskPriority() can be used to specify the scheduling priority of DPU tasks so that different models can be scheduled under the dedicated priorities. dpuSetTaskAffinity() can be used to dynamically assign DPU tasks to desired DPU cores so that the users can participate in DPU cores' assignment and scheduling as required. Meanwhile, such advanced APIs bring forward compatibility so that DNNDK legacy projects can be ported to Vitis platform without any modifications to the existing source code.

Vitis AI advanced low-level C++ APIs are implemented within runtime library libn2cube for edge DPU and are exported within header file n2cube.h, which represents in header file dnndk.h. Hence the users only need to include dnndk.h at the source code.

In the meantime, the users can adopt the suited low-level Python APIs in module n2cube, which are equivalent wrappers for those C++ APIs in library libn2cube. With Python programming interface, the users can reuse the Python code developed during model training phase and quickly deploy the models on edge DPU for evaluation purpose.