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 <mattdsinclair@gmail.com> Maintainer: Matt Sinclair <mattdsinclair@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Matt Sinclair
parent
02dd6b77ff
commit
ebb6c4b99b
@@ -64,6 +64,17 @@ ScalarRegisterFile::operandsReady(Wavefront *w, GPUDynInstPtr ii) const
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +71,17 @@ VectorRegisterFile::operandsReady(Wavefront *w, GPUDynInstPtr ii) const
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user