Xilinx / Vitis-AI

Vitis AI is Xilinx’s development stack for AI inference on Xilinx hardware platforms, including both edge devices and Alveo cards.
https://www.xilinx.com/ai
Apache License 2.0
1.49k stars 633 forks source link

"Only one DPU kernel" error #153

Closed jimd6776 closed 4 years ago

jimd6776 commented 4 years ago

Hello,

I ran the Vitis AI tutorial with an example DenseNetX model successfully for Alveo U50 but when i reach the step for running the application (app_mt.py) it instantly throws the following error:

assert len(subgraphs) == 1 # only one DPU kernel

It seems len(subgraphs) equals 2. Why is that and how I fix this?

Thanks in advance

qianglin-xlnx commented 4 years ago

Hi @jimd6776 Different model will have different number of subgraphs. For DenseNetX model, it has only 1 subgraphs. Following are the logs of running the app_mt.py

/usr/bin/python3 app_mt.py -m model_dir/densenetx.xmodel -t 8

Running on Alveo U50

Command line options: --image_dir : images --threads : 8 --model : model_dir/densenetx.xmodel

FPS=1192.25, total frames = 10000 , time=8.3875 seconds Correct: 9152 Wrong: 848 Accuracy: 0.9152

For the subgraphs more than 1, you can refer to https://github.com/Xilinx/Vitis-AI/blob/master/VART/samples/pose_detection/src/pose.cpp to modify your application.