Matt Sinclair has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/47539 )
Change subject: gpu-compute: Check for WAX dependences
......................................................................
gpu-compute: Check for WAX dependences
This adds checking if the destination registers are free or busy
in the operandsReady() function for both scalar and vector
registers. This allows us to catch WAX dependences between instructions.
Change-Id: I0fb0b29e9608fca0d90c059422d4d9500d5b2a7d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47539
Reviewed-by: Matt Sinclair <mattdsincl...@gmail.com>
Maintainer: Matt Sinclair <mattdsincl...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/gpu-compute/scalar_register_file.cc
M src/gpu-compute/vector_register_file.cc
2 files changed, 22 insertions(+), 0 deletions(-)
Approvals:
Matt Sinclair: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/gpu-compute/scalar_register_file.cc
b/src/gpu-compute/scalar_register_file.cc
index 52e0a2f..3a00093 100644
--- a/src/gpu-compute/scalar_register_file.cc
+++ b/src/gpu-compute/scalar_register_file.cc
@@ -64,6 +64,17 @@
}
}
+ for (const auto& dstScalarOp : ii->dstScalarRegOperands()) {
+ for (const auto& physIdx : dstScalarOp.physIndices()) {
+ if (regBusy(physIdx)) {
+ DPRINTF(GPUSRF, "WAX stall: WV[%d]: %s: physReg[%d]\n",
+ w->wfDynId, ii->disassemble(), physIdx);
+ w->stats.numTimesBlockedDueWAXDependencies++;
+ return false;
+ }
+ }
+ }
+
return true;
}
diff --git a/src/gpu-compute/vector_register_file.cc
b/src/gpu-compute/vector_register_file.cc
index dc5434d..2355643 100644
--- a/src/gpu-compute/vector_register_file.cc
+++ b/src/gpu-compute/vector_register_file.cc
@@ -71,6 +71,17 @@
}
}
+ for (const auto& dstVecOp : ii->dstVecRegOperands()) {
+ for (const auto& physIdx : dstVecOp.physIndices()) {
+ if (regBusy(physIdx)) {
+ DPRINTF(GPUVRF, "WAX stall: WV[%d]: %s: physReg[%d]\n",
+ w->wfDynId, ii->disassemble(), physIdx);
+ w->stats.numTimesBlockedDueWAXDependencies++;
+ return false;
+ }
+ }
+ }
+
return true;
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47539
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: I0fb0b29e9608fca0d90c059422d4d9500d5b2a7d
Gerrit-Change-Number: 47539
Gerrit-PatchSet: 2
Gerrit-Owner: Kyle Roarty <kyleroarty1...@gmail.com>
Gerrit-Reviewer: Alex Dutu <alexandru.d...@amd.com>
Gerrit-Reviewer: Matt Sinclair <mattdsincl...@gmail.com>
Gerrit-Reviewer: Matthew Poremba <matthew.pore...@amd.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s