summaryrefslogtreecommitdiff
path: root/src/cuda-sim/cuda-sim.cc
diff options
context:
space:
mode:
authorDavit Grigoryan <[email protected]>2026-04-28 09:50:44 +0000
committerDavit Grigoryan <[email protected]>2026-04-28 09:50:44 +0000
commit3d4d274eb3a6a23a5924b557d010590e219c5256 (patch)
tree451bc70a5292e9cc055645f2d7365c3332df8385 /src/cuda-sim/cuda-sim.cc
parent2e2f1c89a6b296c9cb28c8e8b0fabb670b4ba3f7 (diff)
fix atomic counters; add more dbg prints
Diffstat (limited to 'src/cuda-sim/cuda-sim.cc')
-rw-r--r--src/cuda-sim/cuda-sim.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cuda-sim/cuda-sim.cc b/src/cuda-sim/cuda-sim.cc
index fb72f25..2a88e5a 100644
--- a/src/cuda-sim/cuda-sim.cc
+++ b/src/cuda-sim/cuda-sim.cc
@@ -1157,6 +1157,15 @@ void ptx_instruction::pre_decode() {
break;
}
+ // Pre-tag atomics on the static template so co-issue eligibility checks
+ // (mem_coissue_disallowed in shader.cc) can detect them at candidate-scan
+ // time. Without this, m_isatomic only gets set during per-instance
+ // functional execution (add_callback path), which is too late — the
+ // intra co-issue scan reads the SHARED template's flag and would
+ // mistakenly admit an atomic into a composite, leaving the warp's
+ // n_atomic counter unbalanced and the warp stuck in waiting().
+ if (m_opcode == ATOM_OP) m_isatomic = true;
+
set_opcode_and_latency();
set_bar_type();
// Get register operands