Kyle Roarty has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/37555 )

Change subject: gpu-compute: Add exp_cnt tracking for buffer store instructions
......................................................................

gpu-compute: Add exp_cnt tracking for buffer store instructions

exp_cnt (expInstsIssued in the code) is used in the waitcnt instruction
to track that data has been read out of VGPRs in previous global
memory instructions, making it safe to overwrite the VGPRs used in said
global memory instructions.

Previously, exp_cnt wasn't being tracked at all, which lead to the
waitcnt finishing immediately, leading to the memory instruction's VPGRs
getting overwritten by subsequent instructions, causing errors.

This patch makes it so waitcnts waiting on exp_cnt will wait for MUBUF
buffer store instructions to read their VGPRs before completing

Change-Id: Idd2b59511bc086cf316217da27b7a228272b0b0f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/37555
Reviewed-by: Matt Sinclair <[email protected]>
Reviewed-by: Alexandru Duțu <[email protected]>
Maintainer: Matt Sinclair <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/gpu-compute/global_memory_pipeline.cc
M src/gpu-compute/schedule_stage.cc
2 files changed, 7 insertions(+), 0 deletions(-)

Approvals:
  Alexandru Duțu: Looks good to me, approved
Matt Sinclair: Looks good to me, but someone else must approve; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/gpu-compute/global_memory_pipeline.cc b/src/gpu-compute/global_memory_pipeline.cc
index 01f986c..bcd93f8 100644
--- a/src/gpu-compute/global_memory_pipeline.cc
+++ b/src/gpu-compute/global_memory_pipeline.cc
@@ -193,6 +193,10 @@
                 mp->disassemble(), mp->seqNum());
         mp->initiateAcc(mp);

+        if (mp->isStore() && mp->isGlobalSeg()) {
+            mp->wavefront()->decExpInstsIssued();
+        }
+
if (((mp->isMemSync() && !mp->isEndOfKernel()) | | !mp->isMemSync())) {
             /**
              * if we are not in out-of-order data delivery mode
diff --git a/src/gpu-compute/schedule_stage.cc b/src/gpu-compute/schedule_stage.cc
index 851cca8..54e9313 100644
--- a/src/gpu-compute/schedule_stage.cc
+++ b/src/gpu-compute/schedule_stage.cc
@@ -144,6 +144,9 @@
                     wf->incLGKMInstsIssued();
                 }
             }
+            if (gpu_dyn_inst->isStore() && gpu_dyn_inst->isGlobalSeg()) {
+                wf->incExpInstsIssued();
+            }
         }
     }


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/37555
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Idd2b59511bc086cf316217da27b7a228272b0b0f
Gerrit-Change-Number: 37555
Gerrit-PatchSet: 2
Gerrit-Owner: Kyle Roarty <[email protected]>
Gerrit-Reviewer: Alexandru Duțu <[email protected]>
Gerrit-Reviewer: Kyle Roarty <[email protected]>
Gerrit-Reviewer: Matt Sinclair <[email protected]>
Gerrit-Reviewer: Matthew Poremba <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-CC: Anthony Gutierrez <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to