liangfu commented on a change in pull request #4392: [VTA] Enable streamlined 
GEMM execution
URL: https://github.com/apache/incubator-tvm/pull/4392#discussion_r350550653
 
 

 ##########
 File path: vta/hardware/chisel/src/main/scala/core/TensorGemm.scala
 ##########
 @@ -236,11 +254,14 @@ class TensorGemm(debug: Boolean = false)(implicit p: 
Parameters)
   when(state === sIdle) {
     inflight := 0.U
   }.elsewhen(!dec.reset) {
-    when(state === sReadTensor) { // issue a tensor
-      inflight := inflight + 1.U
-    }.elsewhen(mvc.io.acc_o.data.valid) { // commit a tensor
-      inflight := inflight - 1.U
-    }
+    when((state === sReadTensor) && mvc.io.acc_o.data.valid) { // issue & 
commit
 
 Review comment:
   Yes, if `latency=3` and we don't handle this case here, the hardware would 
wait infinitely long for `inflight` going to zero. But it never does, because 
sReadTensor state and `mvc.io.acc_o.data.valid` might simultaneously fire when 
latency equals to 3, and in that case, the increase amount in the `inflight` 
counter should be zero.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to