summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJin Wang <[email protected]>2014-10-20 17:19:32 -0400
committerJin Wang <[email protected]>2016-07-05 09:05:36 -0400
commit5fc7bf5872aad126a09cad4b385054c4b3a094aa (patch)
tree448b5c9cc984f96a5a364d8842ff5c4e60290316 /src
parentd31c2da2b34d3d7a63d9980335c85d5e1a19ad02 (diff)
BUG: do not handle cudaGetParameterBufferV2 and cudaLaunchDeviceV2 as call.uni in reconvergence
Diffstat (limited to 'src')
-rw-r--r--src/abstract_hardware_model.h2
-rw-r--r--src/cuda-sim/cuda-sim.cc6
-rw-r--r--src/cuda-sim/ptx_ir.cc3
3 files changed, 9 insertions, 2 deletions
diff --git a/src/abstract_hardware_model.h b/src/abstract_hardware_model.h
index 16f4b31..11fee10 100644
--- a/src/abstract_hardware_model.h
+++ b/src/abstract_hardware_model.h
@@ -864,6 +864,7 @@ public:
m_mem_accesses_created=false;
m_cache_hit=false;
m_is_printf=false;
+ m_is_cdp = false;
}
virtual ~warp_inst_t(){
}
@@ -1016,6 +1017,7 @@ protected:
unsigned cycles; // used for implementing initiation interval delay
bool m_isatomic;
bool m_is_printf;
+ bool m_is_cdp;
unsigned m_warp_id;
unsigned m_dynamic_warp_id;
const core_config *m_config;
diff --git a/src/cuda-sim/cuda-sim.cc b/src/cuda-sim/cuda-sim.cc
index 4281913..58bd4e0 100644
--- a/src/cuda-sim/cuda-sim.cc
+++ b/src/cuda-sim/cuda-sim.cc
@@ -638,7 +638,7 @@ void ptx_instruction::set_opcode_and_latency()
case MEMBAR_OP: op = MEMORY_BARRIER_OP; break;
case CALL_OP:
{
- if(m_is_printf)
+ if(m_is_printf || m_is_cdp)
op = ALU_OP;
else
op = CALL_OPS;
@@ -646,7 +646,7 @@ void ptx_instruction::set_opcode_and_latency()
}
case CALLP_OP:
{
- if(m_is_printf)
+ if(m_is_printf || m_is_cdp)
op = ALU_OP;
else
op = CALL_OPS;
@@ -1219,6 +1219,8 @@ 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 == 440)
+ pc = 440;
assert( pc == inst.pc ); // make sure timing model and functional model are in sync
const ptx_instruction *pI = m_func_info->get_instruction(pc);
set_npc( pc + pI->inst_size() );
diff --git a/src/cuda-sim/ptx_ir.cc b/src/cuda-sim/ptx_ir.cc
index 915c623..861f0dc 100644
--- a/src/cuda-sim/ptx_ir.cc
+++ b/src/cuda-sim/ptx_ir.cc
@@ -1241,6 +1241,9 @@ ptx_instruction::ptx_instruction( int opcode,
if (fname =="vprintf"){
m_is_printf = true;
}
+ if (fname == "cudaGetParameterBufferV2"
+ || fname == "cudaLaunchDeviceV2")
+ m_is_cdp = true;
}
}