From 2e2f1c89a6b296c9cb28c8e8b0fabb670b4ba3f7 Mon Sep 17 00:00:00 2001 From: Davit Grigoryan Date: Mon, 27 Apr 2026 06:39:20 +0000 Subject: fix co-issue scheduling pc assertions --- src/cuda-sim/cuda-sim.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/cuda-sim/cuda-sim.cc') diff --git a/src/cuda-sim/cuda-sim.cc b/src/cuda-sim/cuda-sim.cc index 14ae504..fb72f25 100644 --- a/src/cuda-sim/cuda-sim.cc +++ b/src/cuda-sim/cuda-sim.cc @@ -1794,6 +1794,23 @@ void ptx_thread_info::ptx_exec_inst(warp_inst_t &inst, unsigned lane_id) { bool skip = false; int op_classification = 0; addr_t pc = next_instr(); + if (pc != inst.pc) { + static unsigned dump_count = 0; + if (dump_count < 32) { + dump_count++; + fprintf(stderr, + "[PC_ASSERT_DBG #%u] cycle=%llu warp_id=%u lane=%u hw_tid=%u " + "hw_wid=%u thread_pc=0x%lx inst_pc=0x%lx inst_op=%d " + "active_count=%u dbg_path=%u split_id=%d source_inst=%p\n", + dump_count, + (unsigned long long)(m_gpu->gpu_sim_cycle + m_gpu->gpu_tot_sim_cycle), + inst.warp_id(), lane_id, get_hw_tid(), get_hw_wid(), + (unsigned long)pc, (unsigned long)inst.pc, (int)inst.op, + inst.active_count(), inst.get_dbg_path(), + inst.get_dbg_split_id(), inst.get_dbg_source_inst()); + } + fflush(stderr); + } assert(pc == inst.pc); // make sure timing model and functional model are in sync const ptx_instruction *pI = m_func_info->get_instruction(pc); -- cgit v1.3