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: 
Xilinx Employee
Xilinx Employee
210 Views
Registered: ‎03-27-2013

ERROR: "[DNNDK] Failure of DPU memory space used out" when trying to run DNNDK on Zynq-7000 platform

Jump to solution

Issue:

I tried to run resnet50 DNNDK example on Zedboard following the DPU intergration flow with Vivado2019.1/PetaLinux2019.1 and met following error message:

[DNNDK] Allocate DPU memory space in size of [25534464 B]

[DNNDK] Failure of DPU memory space used out.

Sollution:

After increasing the debug level of DPU driver and add some debug print.

The issue can be located at:

unsigned long dpu_alloc_mem(uint32_t memsize)
{
	void *virtaddr;
	dma_addr_t phy_addr;
	struct memblk_node *pnewnode;

	memsize = (memsize + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1); //at least one page frame

	virtaddr = dma_alloc_coherent(dev_handler, memsize, &phy_addr, GFP_KERNEL);
...

The dma_alloc_coherent() function fails when trying to allocate a 25MB memory space.

The issue would not happen on MPSoC platform.

It is caused by the memory size limitation controlled by CONFIG_FORCE_MAX_ZONEORDER.

It is set to 11 in Zynq-7000 and set to 19 in MPSoC.

So for Zynq-7000 the maximum size is 4MB.

After modifing the value from 11 to a larger value(like 15 in my case) the issue would not occur.

You can find the kernel configuration entrance here:

petalinux-config -c kernel
kernel features -> Maximum zone order

 

Best Regards,
Jason
-----------------------------------------------------------------------------------------------
Please mark the Answer as "Accept as solution" if the information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
-----------------------------------------------------------------------------------------------
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
90 Views
Registered: ‎03-27-2013

Re: ERROR: "[DNNDK] Failure of DPU memory space used out" when trying to run DNNDK on Zynq-7000 platform

Jump to solution

Thanks to @gguasti here comes an AR about step to step flow to implement DPU on Zedboard design:

https://www.xilinx.com/support/answers/73058.html

Best Regards,
Jason
-----------------------------------------------------------------------------------------------
Please mark the Answer as "Accept as solution" if the information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
-----------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
1 Reply
Xilinx Employee
Xilinx Employee
91 Views
Registered: ‎03-27-2013

Re: ERROR: "[DNNDK] Failure of DPU memory space used out" when trying to run DNNDK on Zynq-7000 platform

Jump to solution

Thanks to @gguasti here comes an AR about step to step flow to implement DPU on Zedboard design:

https://www.xilinx.com/support/answers/73058.html

Best Regards,
Jason
-----------------------------------------------------------------------------------------------
Please mark the Answer as "Accept as solution" if the information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
-----------------------------------------------------------------------------------------------

View solution in original post

0 Kudos