gpu-compute: WAX dependency detection (#731)

WAX Dependencies would be missed if a RAW Dependency also existed.
This commit is contained in:
Matt Sinclair
2024-01-05 12:57:24 -06:00
committed by GitHub

View File

@@ -59,6 +59,7 @@ VectorRegisterFile::VectorRegisterFile(const VectorRegisterFileParams &p)
bool
VectorRegisterFile::operandsReady(Wavefront *w, GPUDynInstPtr ii) const
{
bool src_ready = true, dst_ready=true;
for (const auto& srcVecOp : ii->srcVecRegOperands()) {
for (const auto& physIdx : srcVecOp.physIndices()) {
if (regBusy(physIdx) &&
@@ -66,9 +67,13 @@ VectorRegisterFile::operandsReady(Wavefront *w, GPUDynInstPtr ii) const
DPRINTF(GPUVRF, "RAW stall: WV[%d]: %s: physReg[%d]\n",
w->wfDynId, ii->disassemble(), physIdx);
w->stats.numTimesBlockedDueRAWDependencies++;
return false;
src_ready = false;
break;
}
}
if (!src_ready) {
break;
}
}
for (const auto& dstVecOp : ii->dstVecRegOperands()) {
@@ -78,12 +83,16 @@ VectorRegisterFile::operandsReady(Wavefront *w, GPUDynInstPtr ii) const
DPRINTF(GPUVRF, "WAX stall: WV[%d]: %s: physReg[%d]\n",
w->wfDynId, ii->disassemble(), physIdx);
w->stats.numTimesBlockedDueWAXDependencies++;
return false;
dst_ready = false;
break;
}
}
if (!dst_ready) {
break;
}
}
return true;
return src_ready && dst_ready;
}
void