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

Difference between compute_accumulated and compute_preloaded? #314

Open
Nerotos opened this issue Oct 30, 2023 · 2 comments
Open

Difference between compute_accumulated and compute_preloaded? #314

Nerotos opened this issue Oct 30, 2023 · 2 comments

Comments

@Nerotos
Copy link

Nerotos commented Oct 30, 2023

Hello,

from the documentation, they seem to do exactly the same operation for the WS dataflow. Is there a difference here that I am not seeing? Thank you!

@hngenc
Copy link
Member

hngenc commented Nov 30, 2023

The spatial array in Gemmini is double-buffered; you can load in new weights into one set of registers, while continuing to perform matmuls with the old weights in the other set of registers.

compute_accumulated and compute_preloaded in WS mode determine whether your new matmul will use the new weights that you just loaded in, or whether they should use the old weights. Tbh, these types of decisions probably shouldn't have been exposed to the programmer; it would have been better if the hardware had handled these kinds of decisions under-the-hood instead.

@Nerotos
Copy link
Author

Nerotos commented Dec 21, 2023

So you compute on Register A until a compute_accumulated instruction is encountered, after which you compute on Register B?
And the preload instruction will load into the currently inactive register?

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

No branches or pull requests

2 participants