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 <mattdsinclair@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
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();
mp->disassemble(), mp->seqNum());
mp->initiateAcc(mp);
- if (mp->isFlat() && mp->isStore()) {
- mp->wavefront()->decLGKMInstsIssued();
- }
-
if (mp->isStore() && mp->isGlobalSeg()) {
mp->wavefront()->decExpInstsIssued();
}