PYNQ: PYTHON PRODUCTIVITY

RuntimeError: Failed to allocate Memory!

Dear @PeterOgden @rock @gnatale

How are you? I hope you are doing well

Hi, I am doing data processing on PYNQ Z2, it is doing well, until I increase the dataset.

source_data = np.memmap(’…/dataset/10MB.txt’, dtype=np.uint8)
input_buffer = xlnk.cma_array(shape=source_data.shape, dtype=np.int32)

so just using 10MB text file dataset, it already give an error messages:

RuntimeError: Failed to allocate Memory!

Would you mind letting me know how to handle a big size dataset?

Thank you.

I solved it already. It turn out I need to overcommit memory, delete buffer and reset jupyter notebook.

echo 1 > /proc/sys/vm/overcommit_memory

Hopefully help others who face this issues too.
Thank you.

You need to manually delete allocated buffers since they are not freed automatically. Glad you found the solution.