DNNDK Programming APIs - 1.3 English

Vitis AI User Guide (UG1414)

Document ID
UG1414
Release Date
2021-02-03
Version
1.3 English

This section describes the legacy DNNDK programming interface available only for the Edge DPU.

Note: These APIs are deprecated in future releases. For new applications or projects, use the VART APIs.

DNNDK legacy APIs are regarded as Vitis AI advanced low-level C++/Python programming interface. 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 you 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 the 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, you can adopt the suited low-level Python APIs in module n2cube, which are equivalent wrappers for those C++ APIs in library libn2cube. With the Python programming interface, you can reuse the Python code developed during model training phase and quickly deploy the models on edge DPU for evaluation purpose.