04-11-2021 10:20 PM
I am following the Vivado 2020.2 flow for installing Vitis-AI 1.3 on the Ultra96v2 development board on this link:
After flashing the OS image into an SD card and setting up the board, I tried running a python script but got the following error:
AttributeError: module 'xir' has no attribute 'Graph'
I followed the instructions in the link below to fix the error:
However, I am now getting this new error:
F0412 05:00:33.204634 2074 xrt_bin_stream.cpp:59] Check failed: fd_ > 0 (-1 vs. 0) , open(/media/sd-mmcblk0p1/dpu.xclbin) failed. *** Check failure stack trace: *** Aborted
Since I followed the Vivado flow, I don't have the `dpu.xclbin` file. How can I solve this issue (without switching to the Vitis flow)?
04-12-2021 08:20 PM
For Vivado flow, vart also supports it. However, it will use dpu.ko not zocl.ko. For Vitis flow, vart will use zocl.ko which will need dpu.xclbin.
So it seems that dpu.ko is missing in your system. You can run the following command to check if dpu.ko installed in your system.
Module Size Used by
dmaproxy 16384 0
dpu 45056 0
dpcma 16384 0
mali 319488 0
Besides, you can also refer to https://github.com/Xilinx/Vitis-AI/tree/master/dsa/DPU-TRD/prj/Vivado to check if there is some steps missing.
Also, you can refer to the following steps to add dpu.ko
Step 1: Check if there are dpu and dpcma source codes in the following location, if not, add them.
Step 2: Enable dpu and dpcma
A：Add “CONFIG_dpu” and “CONFIG_dpcma” in xilinx-zcu102-trd/project-spec/meta-user/conf/user-rootfsconfig
#Note: Mention Each package in individual line
#These packages will get added into rootfs menu entryCONFIG_gpio-demo
B：Enable dpu & dpcma via run petalinux-config -c rootfs command
04-13-2021 03:38 PM
Thanks for the quick reply. I did not have those 2 modules installed, but now I do
WARNING: Logging before InitGoogleLogging() is written to STDERR F0413 22:30:19.898774 1383 dpu_controller.cpp:44] Check failed: !the_factory_methods.empty() *** Check failure stack trace: *** Aborted
04-14-2021 02:26 AM
I hope you have fixed your problem. Do you have any problem when you sudo cp xclbin file to /usr/lib/ inside the docker Vitis-ai? I cannot sudo cp as it says "sudo must be owned by uid 0 and have the setuid bit set" as I can only enter vitis-ai docker with a non-root user called vitis-ai-user. Thanks a lot.
04-14-2021 03:06 AM
Hi @abdmohamed ,
As describeded by linqiang, you need to follow that two steps, In addtion, you need enable xrt but disable zocl(a. disable zocl in petalinux-config -c rootfs b. deleta zocl configuration in devicetree in recipes-bsp/device-tree/files/system-user.dtsi). As for Vivado flow, we should enable DPU driver and disable ZOCL driver; As for Vitis flow, we should enable ZOCL driver and disable DPU driver. they can't be enabled in one mode at some time, which they are two different development mode.
04-14-2021 12:18 PM
Thanks for the clarification. I went ahead and removed `zocl` configuration from the device tree and disabled its module. However, I am still getting the same error:
WARNING: Logging before InitGoogleLogging() is written to STDERR F0414 19:14:33.995081 1326 dpu_controller.cpp:44] Check failed: !the_factory_methods.empty() *** Check failure stack trace: *** Aborted
04-14-2021 12:29 PM
@davidtsu0901, the workflow for setting up Edge devices is different from the workflow for Alveo cards. So, unfortunately, I can not help you as I have no experience setting up Vitis-AI on Alveo cards.
04-14-2021 07:56 PM
Hi @abdmohamed ,
How do your build your petalinux SD card image? As you konw, We have only released Vitis AI Vivado flow reference(1.1,1.2,1.3) for zcu102 in https://github.com/Xilinx/Vitis-AI/tree/master/dsa/DPU-TRD/prj/Vivado . I'm sorry that I have no idea about your Customizing and Generating the Core in the Zynq UltraScale+ MPSoC (xilinx.com) BTW, the Vitis AI Vivado flow involves the hardware design, petalinux filesystem build, vitis AI runtime and demo, as for petalinux filesystem build section, as linqiang and me describled prior, and the released bsp https://github.com/Xilinx/Vitis-AI/tree/master/dsa/DPU-TRD/prj/Vivado/dpu_petalinux_bsp provide the code structure and source code reference.