Hi all,
I have already posted two posts about this before. I found no satisfactory solution, so I stayed with version 2.6 as the problem does not appear there. But still, if someone could have some insight on how to get rid of this problem of allocating memory in version 2.7 that would be appreciable. Because of this, I can not upgrade to version 2.7. I am using the zcu104 board.
The error is similar to this
Traceback (most recent call last):
File "untitled", line 986, in <module>
frame = allocate(shape=(h, w, 3), dtype=np.uint8, cacheable=True)
File "/usr/local/share/pynq-venv/lib/python3.8/site-packages/pynq/buffer.py", line 172, in allocate
return target.allocate(shape, dtype, **kwargs)
File "/usr/local/share/pynq-venv/lib/python3.8/site-packages/pynq/pl_server/device.py", line 292, in allocate
return self.default_memory.allocate(shape, dtype, **kwargs)
File "/usr/local/share/pynq-venv/lib/python3.8/site-packages/pynq/pl_server/xrt_device.py", line 169, inallocate
buf = _xrt_allocate(shape, dtype, self.device, self.idx, **kwargs)
File "/usr/local/share/pynq-venv/lib/python3.8/site-packages/pynq/pl_server/xrt_device.py", line 124, in_xrt_allocate
bo = device.allocate_bo(size, memidx, cacheable)
File "/usr/local/share/pynq-venv/lib/python3.8/site-packages/pynq/pl_server/xrt_device.py", line 414, inallocate_bo
raise RuntimeError("Allocate failed: " + str(bo))
RuntimeError: Allocate failed: 4294967295
How this problem occurs:
when the allocate function initializes every time inside a while loop which is looping through 60times in a second.
I think, it is not overwriting the buffer and take each time a new buffer so memory is flooded, which is not the case for version 2.6. Also, FPS is reduced to 4.6 FPS, instead of 60.
h=200
w=200
while (run):
frame = allocate(shape=(h, w, 3), dtype=np.uint8, cacheable=True)
If I put the allocate function outside and flood with zeros each time before doing any operation on it, it adds extra latency, which I can not afford for the project.
The question is how to solve this problem? Any idea will be really appreciable.
Mizan