Closed wimrijnders closed 4 years ago
So, the VPM can hold 192 blocks of 16-floats at any time.
If I read the reference doc properly, the VPM is also used for outgoing data, so assume 96 blocks for incoming data.
This means that when utilizing all 12 QPU's, you can prefetch 8 full groups of data with DMA. There is definitely room for keeping the QPU's busy here. Looking forward to maximal utilization of this.
EDIT: If you can reuse the blocks for incoming data for writing back the results, it will be double that! Very exciting this. I'm hoping that I'm smart enough to figure how to make this work, otherwise I'm really hoping that you implement it.
Also, I think it is now possible to use the VPM for local storage of data, correct? This opens possibilities. Or would you regard it as an abuse of the VPM?
Examined the VPM register definitions in the reference docs, p56 onwards. It's appears that I was overly optimistic in my utterances. Please confirm if the following is correct, if you can:
A given QPU can initiate at most one DMA read and one DMA write at any given time. However, the read and the write can overlap.
In addition, I encountered something about limits of VPM usage with respect to given shader types. So possibly not all of the VPM is available at any given time. However, OTOH, it's possible to configure what shaders are allowed to use the VPM.
So my grand scheme of maximal prefetching is not possible. Time to start thinking about something else right now.
Last commit: Added two more methods to RegisterMap
, which I'm interested in:
Now that DMA is enabled, it's interesting to know what the actual size is of the VPM. This adds it to the output of
detectPlatform
.Example output:
NOTE: This will probably not work on your machine until #52 and #53 have been merged.