summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/abstract_hardware_model.cc3
-rw-r--r--src/cuda-sim/ptx_loader.cc6
-rw-r--r--src/gpgpu-sim/gpu-sim.cc4
3 files changed, 11 insertions, 2 deletions
diff --git a/src/abstract_hardware_model.cc b/src/abstract_hardware_model.cc
index 819ad35..fe6f8ab 100644
--- a/src/abstract_hardware_model.cc
+++ b/src/abstract_hardware_model.cc
@@ -550,7 +550,8 @@ void warp_inst_t::completed( unsigned long long cycle ) const
ptx_file_line_stats_add_latency(pc, latency * active_count());
}
-//Jin: kernel launch latency
+//Jin: CDP support
+bool g_cdp_enabled;
unsigned g_kernel_launch_latency;
unsigned kernel_info_t::m_next_uid = 1;
diff --git a/src/cuda-sim/ptx_loader.cc b/src/cuda-sim/ptx_loader.cc
index f7bf70e..a646408 100644
--- a/src/cuda-sim/ptx_loader.cc
+++ b/src/cuda-sim/ptx_loader.cc
@@ -217,7 +217,11 @@ void gpgpu_ptxinfo_load_from_string( const char *p_for_info, unsigned source_num
#if CUDART_VERSION >= 3000
if (sm_version == 0) sm_version = 20;
- snprintf(extra_flags,1024,"--gpu-name=sm_%u",sm_version);
+ extern bool g_cdp_enabled;
+ if(!g_cdp_enabled)
+ snprintf(extra_flags,1024,"--gpu-name=sm_%u",sm_version);
+ else
+ snprintf(extra_flags,1024,"--compile-only --gpu-name=sm_%u",sm_version);
#endif
snprintf(commandline,1024,"$CUDA_INSTALL_PATH/bin/ptxas %s -v %s --output-file /dev/null 2> %s",
diff --git a/src/gpgpu-sim/gpu-sim.cc b/src/gpgpu-sim/gpu-sim.cc
index 02c9c09..0b4b2f6 100644
--- a/src/gpgpu-sim/gpu-sim.cc
+++ b/src/gpgpu-sim/gpu-sim.cc
@@ -449,6 +449,10 @@ void gpgpu_sim_config::reg_options(option_parser_t opp)
option_parser_register(opp, "-gpgpu_kernel_launch_latency", OPT_INT32,
&g_kernel_launch_latency, "Kernel launch latency in cycles. Default: 0",
"0");
+ extern bool g_cdp_enabled;
+ option_parser_register(opp, "-gpgpu_cdp_enabled", OPT_BOOL,
+ &g_cdp_enabled, "Turn on CDP",
+ "0");
}
/////////////////////////////////////////////////////////////////////////////