Closed shashank-agg closed 4 years ago
This is already there and is documented in our example notebooks multiple times.
You will have to use the target
keyword and pass wich memory you want to use (from the loaded overlay, so it will automatically reference the target device)
buf = pynq.allocate((1024,1024), 'u4', target=ol.bank0)
Closing.
Just for reference. Allocate cannot work without the target
kw in two use cases:
EDIT: I understand though that the multi-device scenario is left a bit behind int terms of documentation, so I get why you got to this point.
EDIT2: thanks anyways for reporting this out, we should have better erroring for this use case, so it is good you brought it to our attention. Thanks!!
I agree that we need some better documentation on this. pynq.allocate
has a target
keyword argument which can be set with either a device or a memory bank so the functionality is there it's just not obvious when things go wrong. There are some more subtle issues that might arise as well with multiple card setups we should probably try and catch as well - namely buffers for one card being used with accelerators on another which right now will not error out and seem to work but ultimately lead to undefined behaviour.
This is more of a documentation issue than a real 'bug'.
Server: CentOS with two devices: xilinx_u280_xdma_201920_1 xilinx_u200_xdma_201830_2
I am trying to run the vector-addition example on the u200 Minimal reproducible example:
This fails with the error:
However, if instead of using the
device
argument for theoverlay
method, if I use the following, it works:Im guessing this is because the
allocate
method still uses the default device. So eitherallocate
should accept the device as an argument, or we should mention this as a gotcha in the multi-device example.