From a4657f1b84f5deeb1573b01989eb3f2818c13f43 Mon Sep 17 00:00:00 2001 From: Kyle Roarty Date: Thu, 14 Jan 2021 18:06:30 -0600 Subject: [PATCH] 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 --- src/gpu-compute/global_memory_pipeline.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- 2.30.2