summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim
diff options
context:
space:
mode:
authorMahmoud <[email protected]>2019-11-20 19:51:20 -0500
committerMahmoud <[email protected]>2019-11-20 19:51:20 -0500
commit689316eff10035a1171e6b4917ce0616ecb3e938 (patch)
tree3430b73ff0d0abe04e1632b1eb6e9221a8dfbe01 /src/gpgpu-sim
parent4702017e7597fc31cb4f2337aa5d9e8ba8287418 (diff)
fixing atomic bug in trace-driven mode
Diffstat (limited to 'src/gpgpu-sim')
-rw-r--r--src/gpgpu-sim/l2cache.cc3
-rw-r--r--src/gpgpu-sim/shader.cc3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/gpgpu-sim/l2cache.cc b/src/gpgpu-sim/l2cache.cc
index 8bbe91c..4a312d1 100644
--- a/src/gpgpu-sim/l2cache.cc
+++ b/src/gpgpu-sim/l2cache.cc
@@ -755,8 +755,9 @@ mem_fetch* memory_sub_partition::pop()
{
mem_fetch* mf = m_L2_icnt_queue->pop();
m_request_tracker.erase(mf);
- if ( mf && mf->isatomic() && !m_gpu->get_config().is_trace_driven_mode() )
+ if ( mf && mf->isatomic() && !m_gpu->get_config().is_trace_driven_mode() ){
mf->do_atomic();
+ }
if( mf && (mf->get_access_type() == L2_WRBK_ACC || mf->get_access_type() == L1_WRBK_ACC) ) {
delete mf;
mf = NULL;
diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc
index 0ea819d..de6d975 100644
--- a/src/gpgpu-sim/shader.cc
+++ b/src/gpgpu-sim/shader.cc
@@ -2342,8 +2342,9 @@ void ldst_unit::writeback()
case 3: // global/local
if( m_next_global ) {
m_next_wb = m_next_global->get_inst();
- if( m_next_global->isatomic() )
+ if( m_next_global->isatomic() ) {
m_core->decrement_atomic_count(m_next_global->get_wid(),m_next_global->get_access_warp_mask().count());
+ }
delete m_next_global;
m_next_global = NULL;
serviced_client = next_client;