DNNDK N2Cube Runtime - 1.3 English

Vitis AI User Guide (UG1414)

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

For the Edge DPUCZDX8G, legacy DNNDK runtime framework (called N2Cube) is shown in the following figure. For Vitis AI release, N2Cube is based on the XRT. For legacy Vivado® based DPU, it interacts with the underlying Linux DPU driver (instead of XRT) for DPU scheduling and resource management.

Starting with Vitis AI v1.2 release, N2Cube is now available as open source. More details are available in the tools/Vitis-AI-Runtime/DNNDK directory in the Vitis AI repository.
Note: N2Cube will be deprecated in future releases. For new applications or projects, use the VART instead.
Figure 1. Legacy MPSoC Runtime Stack

N2Cube offers a comprehensive C++/Python programming interface to flexibly meet the diverse requirements for edge scenarios. Refer to DNNDK Programming APIs for more details about edge DPU advanced programming. The highlights for N2Cube are listed as follows:

  • Supports multi-threading and multi-process DPU application deployment.
  • Supports multiple models running in parallel and zero-overhead dynamic switching at run time.
  • Automated DPU multi-core scheduling for better workload balancing.
  • Optional flexibility to dynamically specify DPU core affinity over DPU tasks at run time.
  • Priority based DPU task scheduling while adhering to DPU cores affinity.
  • Optimized memory usage through DPU code and parameter sharing within multi-threaded DPU application.
  • Easily adapts to any POSIX-compliant OS or Real-Time Operating System (RTOS) environment, such as QNX, VxWorks, and Integrity.
  • Ease-of-use capabilities for DPU debugging and performance profiling.

Currently, N2Cube officially supports three operating environments, including Linux, Xilinx XRT, and BlackBerry QNX RTOS. You can contact the Xilinx representatives to acquire the Vitis AI package for QNX or to port N2Cube to other third party RTOS. As the source code is accessible, you can freely port N2Cube to any other environment.