PYNQ on Alveo,TypeError buffer is too small for requested array

I am trying to run the first pynq alveo example,vector addtion. But it failed when the step of allocating memory.
TypeError: buffer is too small for requested array.
It seems that there is nothing to do the with the overlay.My device is alveo u50,and the platform is xilinx_u50_gen3x16_xdma_201920_3.I confirmed that the Alveo u50 card has been well installed because all the test has been passed.How can I do to solve the problem? thanks

This is a known issue when running with XRT 2020.1. We’re in the process of releasing a patched version of PYNQ to handle it.

As a work around for the time being you can make a couple of edits to the pynq/pl_server/xrt_device.py wherever you installed PYNQ:

After line 132 (buf = device.map_bo(BO)) add the following line

buf = ctypes.cast(buf, ctypes.POINTER(ctypes.c_char * size))[0]

And on line 418 (or 419) inside the map_bo function remove the [0] at the end of the return statement.

That should hopefully resolve the issue. We’re current working to make sure we have a code-base which supports both 2019.2 and 2020.1 hence why the official fix release is taking a few days longer.

Peter

Thaks a lot .I have successfully run the Vector Addtion Application according to your method.