From: Kyle Roarty Date: Tue, 19 Jan 2021 20:00:58 +0000 (-0600) Subject: gpu-compute: Simplify LGKM decrementing for Flat instructions X-Git-Tag: develop-gem5-snapshot~262 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=68fe6fa6cbb31045e33c074566b71ff444c2cf76;p=gem5.git gpu-compute: Simplify LGKM decrementing for Flat instructions This commit makes it so LGKM count is decremented in a single place (after completeAcc), which fixes a couple of potential bugs 1. Data is only written by completeAcc, not after initiateAcc. LGKM count is supposed to be decremented after data is written. 2. LGKM count is now properly decremented for atomics without return Change-Id: Ic791af3b42e04f7baaa0ce50cb2a2c6286c54f5a Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39396 Reviewed-by: Matt Sinclair Reviewed-by: Matthew Poremba Maintainer: Matt Sinclair Tested-by: kokoro --- diff --git a/src/gpu-compute/global_memory_pipeline.cc b/src/gpu-compute/global_memory_pipeline.cc index 48f767b56..2f251e864 100644 --- a/src/gpu-compute/global_memory_pipeline.cc +++ b/src/gpu-compute/global_memory_pipeline.cc @@ -130,7 +130,7 @@ GlobalMemPipeline::exec() DPRINTF(GPUMem, "CU%d: WF[%d][%d]: Completing global mem instr %s\n", m->cu_id, m->simdId, m->wfSlotId, m->disassemble()); m->completeAcc(m); - if (m->isFlat() && (m->isLoad() || m->isAtomicRet())) { + if (m->isFlat()) { w->decLGKMInstsIssued(); } w->decVMemInstsIssued(); @@ -196,10 +196,6 @@ GlobalMemPipeline::exec() mp->disassemble(), mp->seqNum()); mp->initiateAcc(mp); - if (mp->isFlat() && mp->isStore()) { - mp->wavefront()->decLGKMInstsIssued(); - } - if (mp->isStore() && mp->isGlobalSeg()) { mp->wavefront()->decExpInstsIssued(); }