Kyle Roarty has uploaded this change for review. (
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
---
M src/gpu-compute/scalar_register_file.cc
M src/gpu-compute/vector_register_file.cc
2 files changed, 22 insertions(+), 0 deletions(-)
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: 1
Gerrit-Owner: Kyle Roarty <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s