UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer erezmano
Observer
610 Views
Registered: ‎07-25-2018

DPU driver problem on Ultra96

Jump to solution

Screenshot from 2019-04-02 22-45-18.pngScreenshot from 2019-04-02 22-50-36.png

Hello, I used the DPU-TRD reference design (ZCU102) files for building ultra96 board, I made new hardware, petalinux and sdk from scratch with similar assignments (used https://github.com/Xilinx/Edge-AI-Platform-Tutorials/blob/master/docs/DPU-Integration/README.md). 

But when I try to run the application or using dexplorer i get the error in the attached image. I can see the driver exist but maybe it is because the dpu.ko came from the ZCU102.

can you help me solve that ?

0 Kudos
1 Solution

Accepted Solutions
Observer erezmano
Observer
548 Views
Registered: ‎07-25-2018

Re: DPU driver problem on Ultra96

Jump to solution

latest dpu-trd files are now included with drivers folder. adding them as modules to the build solved the problem

dexplorer now works.

 Screenshot from 2019-04-03 14-43-38.png

15 Replies
Xilinx Employee
Xilinx Employee
566 Views
Registered: ‎01-21-2014

Re: DPU driver problem on Ultra96

Jump to solution
What do you get when you try "dexplorer -w" ?
0 Kudos
Xilinx Employee
Xilinx Employee
584 Views
Registered: ‎01-21-2014

Re: DPU driver problem on Ultra96

Jump to solution

First, that tutorial was not supposed to be made public yet, it's still being worked on to iron out a few issues.  It should be updated and available in the next couple of weeks, along with the design files archive referenced in the doc. 

What model .elf are you linking with the application? It needs to be targeting the B1152, and must be compiled with v1.3.0 of dnnc.  I suspect that you're not using the correct model.  Not sure if that would cause the errors you're seeing though.  When the module is inserted, what messages are printed out?

The dpu.ko provided with the TRD will work with both ZCU102 and Ultra96. 

 

Terry

 

Observer erezmano
Observer
577 Views
Registered: ‎07-25-2018

Re: DPU driver problem on Ultra96

Jump to solution

o.k. thank you. I will wait for the reference ultra96 design.

can you explain why the "dexplorer -v" is not working ? do you know which registers it tries to read ?

0 Kudos
Observer erezmano
Observer
559 Views
Registered: ‎07-25-2018

Re: DPU driver problem on Ultra96

Jump to solution

same response

Screenshot from 2019-04-03 09-19-41.png

0 Kudos
Observer erezmano
Observer
549 Views
Registered: ‎07-25-2018

Re: DPU driver problem on Ultra96

Jump to solution

latest dpu-trd files are now included with drivers folder. adding them as modules to the build solved the problem

dexplorer now works.

 Screenshot from 2019-04-03 14-43-38.png

Explorer
Explorer
541 Views
Registered: ‎10-21-2015

Re: DPU driver problem on Ultra96

Jump to solution

Hi @erezmano 

Have you tried applications with your built ultra96 dpu system  which  is modified from zcu102 trd?

I think you can use application source codes and models for ultra96

at  https://www.xilinx.com/member/forms/download/dnndk-eula-xef.html?filename=xlnx_dnndk_v2.08_190201.tar.gz

instead of  those of zcu102 trd

0 Kudos
Xilinx Employee
Xilinx Employee
528 Views
Registered: ‎01-21-2014

Re: DPU driver problem on Ultra96

Jump to solution

You can use the source code from the v2.08 dnndk eval package, but not the models. Those models are compiled with dnnc v1.3.7 and can only target  the B1152 DPU 1.3.7.  The DPU released in the TRD is the unified  DPU IP for vivado, v1.3.0. You have to create the model .elf with dnnc 1.3.0. 

 

Regards, 

Terry

 

0 Kudos
Explorer
Explorer
522 Views
Registered: ‎10-21-2015

Re: DPU driver problem on Ultra96

Jump to solution

Hi @terryo 

Do you mean that we can use  inception_v1 and resnet50  under xilinx_dnndk_v2.08/host_x86/models for quick check ? 

http://www.deephi.com/assets/ResNet50.tar.gz includes image data for calibration  

0 Kudos
Xilinx Employee
Xilinx Employee
518 Views
Registered: ‎01-21-2014

Re: DPU driver problem on Ultra96

Jump to solution

I'm not sure what you're asking. The models delivered with the Ultra96 DNNDK v2.08 sample applications are not compatible with the v1.3.0 DPU delivered with the TRD. 

 

Terry

 

0 Kudos
Explorer
Explorer
510 Views
Registered: ‎10-21-2015

Re: DPU driver problem on Ultra96

Jump to solution

The sample models  is included in DNNDK v2.08 to run decent & dnnc in host machine

I think we make model for ultra96 dpu from them using  dnnc & decent

Is dnnc/decent of  DNNDK v2.08 not compatible with v1.3.0 DPU?

DNNDK v2.08 has  both dnnc-dpu1.30 and dnnc-dpu1.37

I think the model for ultra96 can be made using dnnc-dpu1.30

0 Kudos
Xilinx Employee
Xilinx Employee
505 Views
Registered: ‎01-21-2014

Re: DPU driver problem on Ultra96

Jump to solution

When compiling the model .elf to use with the DPU v1.3.0 from the TRD, you'll need to manually point to the dnnc v1.3.0 that is included with the host tools.  By default, dnnc v1.3.7 is used for Ultra96 since that's the version of the DPU delivered with the dnndk eval package. 

 

Terry

 

0 Kudos
Explorer
Explorer
493 Views
Registered: ‎10-21-2015

Re: DPU driver problem on Ultra96

Jump to solution

This is modified dnnc.sh

net="resnet50"
model_dir="decent_output"
output_dir="dnnc_output"

# Set DPU Arch
DPU_ARCH="1152FA"
#info=$(ls /usr/local/bin/dnnc -lh |grep dpu1.3.0)
#if [ "$info" != "" ]; then
#    DPU_ARCH="4096FA"
#fi

# Set CPU Arch
CPU_ARCH="arm64"

# Set DNNC mode
DNNC_MODE="debug"

if [ ! -d "$model_dir" ]; then
    echo "Can not found directory of $model_dir"
    exit 1
fi

[ -d "$output_dir" ] || mkdir "$output_dir"
echo "Compiling network: ${net}"

dnnc-dpu1.3.0 --prototxt=${model_dir}/deploy.prototxt     \
       --caffemodel=${model_dir}/deploy.caffemodel \
       --output_dir=${output_dir}                  \
       --net_name=${net}                           \
       --dpu=${DPU_ARCH}                           \
       --mode=${DNNC_MODE}                         \
       --cpu_arch=${CPU_ARCH}

The result of dnnc is the following

Compiling network: resnet50
[DNNC][Warning] Only max pooling is supported, but [pool5] layer has average pooling type.
[DNNC][Warning] layer [pool5] is not supported in DPU, deploy it in CPU instead.
[DNNC][Warning] layer [prob] is not supported in DPU, deploy it in CPU instead.

DNNC Kernel Information

1. Overview
kernel numbers  : 4
kernel topology : resnet50_kernel_graph.jpg

2. Kernel Description in Detail
kernel id       : 0
kernel name     : resnet50_0
type            : DPUKernel
nodes           : NA
input node(s)   : conv1(0) 
output node(s)  : res5c_branch2c(0) 

kernel id       : 1
kernel name     : resnet50_1
type            : CPUKernel
nodes           : NA
input node(s)   : pool5 
output node(s)  : pool5 

kernel id       : 2
kernel name     : resnet50_2
type            : DPUKernel
nodes           : NA
input node(s)   : fc1000(0) 
output node(s)  : fc1000(0) 

kernel id       : 3
kernel name     : resnet50_3
type            : CPUKernel
nodes           : NA
input node(s)   : prob 
output node(s)  : prob 

dnnc generate two elf files : dpu_resnet50_0.elf, dpu_resnet50_2.elf

which main.cc  should be used for resnet50, zcu102 or ultra96 ?

0 Kudos
Xilinx Employee
Xilinx Employee
480 Views
Registered: ‎01-21-2014

Re: DPU driver problem on Ultra96

Jump to solution
The one for ZCU102, which will use two kernels.
0 Kudos
Observer jinhua
Observer
157 Views
Registered: ‎01-02-2019

Re: DPU driver problem on Ultra96

Jump to solution

I had the same problem.

I don't konw how to use the two dpu version(dnnc-dpu1.3.0 and dnnc-dpu1.3.7).

when I modified the dnnc.sh,

--dpu=1152FA                          \

 And there is no dpu version problem, but the result of dnnc is same as yours. There are two elf files : dpu_resnet50_0.elf, dpu_resnet50_2.elf.

Then I use the main.cc of zcu102 to build makefile, but the build file resnet50 was not worked.

The problem is :

./resnet50: error while loading shared libraries: libopencv_stitching.so.3.1: cannot open shared object file:No such file or directory

Can you help me to solve this problem?

0 Kudos
Xilinx Employee
Xilinx Employee
143 Views
Registered: ‎03-21-2008

Re: DPU driver problem on Ultra96

Jump to solution

To answer your question about setting the DPU version -

The dnnc compiler version either 1.3.0 or 1.3.7, can be set by sourcing install.sh <board_name>  from the host_x86 directory of version 2.0.8 of the dnndk tools.

Setting the board name to Ultra96 will selct 1.3.7, and setting the board name to ZCU102 or ZCU104 will select 1.3.0.

 

0 Kudos