Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VPM size to detectPlatform output #57

Closed
wants to merge 6 commits into from

Conversation

wimrijnders
Copy link
Contributor

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:

> sudo obj-qpu/bin/detectPlatform
Detected platform: Raspberry Pi 2 Model B Rev 1.1
Hardware revision: a01041
Number of slices: 3
Number of QPU's per slice: 4
Size of VPM: 12KB                    # <-- This is new

NOTE: This will probably not work on your machine until #52 and #53 have been merged.

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:

```
> sudo obj-qpu/bin/detectPlatform
Detected platform: Raspberry Pi 2 Model B Rev 1.1
Hardware revision: a01041
Number of slices: 3
Number of QPU's per slice: 4
Size of VPM: 12KB                    # <-- This is new

```

**NOTE:* This will probably not work on your machine until mn416#52 and mn416#53 have been merged.
@wimrijnders
Copy link
Contributor Author

wimrijnders commented Jul 16, 2018

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.

@wimrijnders
Copy link
Contributor Author

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?

@wimrijnders
Copy link
Contributor Author

wimrijnders commented Jul 16, 2018

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.

@wimrijnders
Copy link
Contributor Author

Last commit: Added two more methods to RegisterMap, which I'm interested in:

  • Number of TMU's per slice
  • Check if L2 cache is enabled.

@wimrijnders wimrijnders deleted the add-vpm-size branch July 12, 2020 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant