diff options
| author | Ahmad Alawneh <[email protected]> | 2025-07-12 15:28:14 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-12 19:28:14 +0000 |
| commit | 33644740f15e0fa9f3d64ff98956569b2acf47bc (patch) | |
| tree | 4673d52f8107801f9fea33aa600fc07f9474076d | |
| parent | 9d88a1c6b63c46d085410a6937d2f6c29f02f10a (diff) | |
clock64 temp fix (#125)
* clock64 temp fix
* comment
| -rw-r--r-- | src/cuda-sim/ptx_sim.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cuda-sim/ptx_sim.cc b/src/cuda-sim/ptx_sim.cc index 2a548ee..9a22d02 100644 --- a/src/cuda-sim/ptx_sim.cc +++ b/src/cuda-sim/ptx_sim.cc @@ -202,8 +202,9 @@ unsigned ptx_thread_info::get_builtin(int builtin_id, unsigned dim_mod) { case CLOCK_REG: return (unsigned)(m_gpu->gpu_sim_cycle + m_gpu->gpu_tot_sim_cycle); case CLOCK64_REG: - abort(); // change return value to unsigned long long? - // GPGPUSim clock is 4 times slower - multiply by 4 + // Change return value to unsigned long long? + // Currently returns 32-bit unsigned, which may cause truncation for large values. + // GPGPUSim clock is 4 times slower - multiply by 4 return (m_gpu->gpu_sim_cycle + m_gpu->gpu_tot_sim_cycle) * 4; case HALFCLOCK_ID: // GPGPUSim clock is 4 times slower - multiply by 4 |
