From 55fce58c19036d244ae3b54a107014ed4d5cc4f8 Mon Sep 17 00:00:00 2001 From: KaiBatley Date: Wed, 3 Jan 2024 22:02:02 -0600 Subject: [PATCH] gpu-compute: WAX dependency detection WAX Dependencies would be missed if a RAW Dependency also existed. Change-Id: I2a9e50b9d0540a30de9c1bf6bb544c7b9654cb29 --- src/gpu-compute/vector_register_file.cc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/gpu-compute/vector_register_file.cc b/src/gpu-compute/vector_register_file.cc index b5f17c82d0..8d7f86b368 100644 --- a/src/gpu-compute/vector_register_file.cc +++ b/src/gpu-compute/vector_register_file.cc @@ -58,15 +58,20 @@ 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)) { 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()) { @@ -75,12 +80,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