cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dvukadin
Participant
Participant
243 Views
Registered: ‎07-19-2018

how to run tiny yolov3 with DpuTask when there are multiple subgraphs after compiling model (VAI 1.3)

Hi,

I am trying to run tiny_yolov3_416 with DpuTask::create on VAI 1.3, but I don't know how to implement DpuTask functions for calling multiple subgraphs.

After compiling, there are two sugraphs of tiny_yolov3_416 and I am not sure how to implement them.

The following example does not work:

auto task = vitis::ai::DpuTask::create(kernel_name) // kernel_name = "/usr/share/...../tiny_yolov3_416.xmodel"

task->setImageRGB(image);

task->run(0u); // run only subgraph[0]

auto output_tensor = task->getOutputTensor(1u); // get output tensors from subgraph[1]

 

I think I need to get output tensors from sugraph[0] and set them as input tensors of subgraph[1] and run subgraph[1] but I don't know how to do it.

 

Any help would be appreciated.

 

Regards,

dvukadin

0 Kudos
2 Replies
jheaton
Xilinx Employee
Xilinx Employee
175 Views
Registered: ‎03-21-2008

Are you saying that you have 2 DPU subgraphs? I would not expect that for TinyYolov3.
Can you share the compiler output.

If you are converting from Darknet to Caffe, there is a layer change you need to make to compatible with the DPU.

0 Kudos
dvukadin
Participant
Participant
150 Views
Registered: ‎07-19-2018

Yes, I have 2 DPU subgraphs. I am converting tiny_yolov3 from Darknet to Caffe with the script: Vitis-AI/models/AI-Model-Zoo/caffe-xilinx/scripts/convert.py (branch: v1.3)

I only had to change "stride=2" to "stride=1" in [maxpool] at 92.-96. lines.

These lines are from compiler stdout:

"[UNILOG][INFO] Begin to compile...
[UNILOG][WARNING] xir::Op{name = layer11-maxpool, type = pool-fix} has been assigned to CPU: ["kernel"(1x1) is not in DPU supported range {2, 3, 4, 5, 6, 7, 8}].
[UNILOG][INFO] Total device subgraph number 6, DPU subgraph number 2
[UNILOG][INFO] Compile done."

Please find attached the compiler output.

Thanks!

 

 

0 Kudos