From 68fe6fa6cbb31045e33c074566b71ff444c2cf76 Mon Sep 17 00:00:00 2001 From: Kyle Roarty Date: Tue, 19 Jan 2021 14:00:58 -0600 Subject: [PATCH] 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 --- src/gpu-compute/global_memory_pipeline.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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(); } -- 2.30.2