From: Kyle Roarty Date: Fri, 15 Jan 2021 00:06:30 +0000 (-0600) Subject: gpu-compute: Fix LGKM decrementing for flat atomic insts X-Git-Tag: develop-gem5-snapshot~291 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a4657f1b84f5deeb1573b01989eb3f2818c13f43;p=gem5.git gpu-compute: Fix LGKM decrementing for flat atomic insts A prior commit (f6ec145fc0) fixed early LGKM decrementing for flat loads and stores, but failed to address flat atomics. Per the GCN3 ISA, LGKM count is decremented on flat atomics with return when the data has been returned. This patch checks if the flat instruction is an atomic with return, and decrements LGKM count if so. Change-Id: I5c0c2c205a8b21327d4c42ba71c59842c15bd63b Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39155 Reviewed-by: Matthew Poremba Reviewed-by: Matt Sinclair Maintainer: Matthew Poremba Tested-by: kokoro --- diff --git a/src/gpu-compute/global_memory_pipeline.cc b/src/gpu-compute/global_memory_pipeline.cc index a2b24e4b4..f6d60cf08 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()) { + if (m->isFlat() && (m->isLoad() || m->isAtomicRet())) { w->decLGKMInstsIssued(); } w->decVMemInstsIssued();