Xilinx / Vitis-AI-Tutorials

MIT License
360 stars 145 forks source link

running tutorials on ZCU102 DPU-TRD #12

Open jstefanowicz opened 3 years ago

jstefanowicz commented 3 years ago

I'm trying to run the MNIST-Classification-TensorFlow tutorial on the ZCU102. I went through all the steps and generated the .elf file for the DPU. I've loaded a pre-compiled DPU-TRD image from https://www.xilinx.com/member/forms/download/design-license-xef.html?filename=zcu102-dpu-trd-2019-1-190809.zip which boots on my ZCU102 without issues. The problem is that it appears that the above DPU-TRD image doesn't contain python packages needed by the script in Vitis-AI-Tutorials/files/build/target_zcu102/app_mt.py. Should I use a different precompiled DPU-TRD image?

root@zcu102-dpu-trd-2019:~# python3 app_mt.py -m model_dir/dpu_customcnn.elf 
Traceback (most recent call last):
  File "app_mt.py", line 17, in <module>
    import runner
ImportError: No module named 'runner'

The resnet50 example, which is part of the DPU-TRD image works fine

jstefanowicz commented 3 years ago

I followed the ZCU102 board setup for Vitis-AI described in ug1414 (Setting Up the ZCU102/104 Evaluation Board), installed the Vitis-AI runtime, and everything without issues. Still it appears the python libs for Vitis-AI runtime are not available - I'm still getting errors when importing the runner module in Python3. Where are target board setup instructions for tutorials from this repo? It would be good for you to document which board setup instructions one should follow to run these tutorials on the ZCU102.

jstefanowicz commented 3 years ago

I finally managed to run the python script from the MNIST tutorial on my ZCU102 after following https://github.com/Xilinx/Vitis-AI/tree/v1.2.1/VART#quick-start-for-edge. It would be good if you documented what tutorial one could use to set up the target platform to be able to run these examples, as this was not obvious and I had trouble figuring this out myself.

I haven't closed this issue even though the tutorial is now working because, in my opinion, you should link to a valid platform setup tutorial in the readme.