-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[VTA] [Chisel] fix tensor issue/commit in gemm #3637
Conversation
@@ -39,10 +39,10 @@ class MAC(aBits: Int = 8, bBits: Int = 8, cBits: Int = 16) extends Module { | |||
val rA = RegNext(io.a) | |||
val rB = RegNext(io.b) | |||
val rC = RegNext(io.c) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These edits will add noise to the github history of the file. Can we fix all of the spacing issues in a separate PR for the Chisel codebase until we have lint tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I just realized - the edit was adding a tab; the spacing issues were already fixed before. That said a lint test would have caught that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, let me try to do that.
Btw, all the ASF headers for the entire codebase has the same issue.
* fix tensor issue/commit in gemm * remove trailing spaces
* fix tensor issue/commit in gemm * remove trailing spaces
* fix tensor issue/commit in gemm * remove trailing spaces
Background
The
inflight
counter tracks the number ofinp
andwgt
tensors issue to theMatrixVectorMultiplication
module.Bug
The current bug is related to the way the counter is being incremented. The counter is incremented on the same state
sExe
where theGEMM
unit asserts thedone
signal. Since the increment happen on the next cycle then the unit will assertdone
but the values are not written back to memory yet because of the depth of the pipeline.Solution
Now, we increment the
inflight
counter once we read the tensors and decrement it when we write-back.