summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMengchi Zhang <[email protected]>2019-07-11 23:29:21 -0400
committerMengchi Zhang <[email protected]>2019-07-11 23:29:21 -0400
commit0f5f90ebd896b807270abfae2cd7634733654668 (patch)
treec67eca2e69f3e175cf5df419162ca0da5712771c /src
parent2f22ddb07752bc956063f6548d4bc26a6ae066f2 (diff)
Move g_kernel_launch_latency
Signed-off-by: Mengchi Zhang <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/abstract_hardware_model.cc3
-rw-r--r--src/cuda-sim/cuda_device_runtime.h1
-rw-r--r--src/gpgpu-sim/gpu-sim.cc3
3 files changed, 3 insertions, 4 deletions
diff --git a/src/abstract_hardware_model.cc b/src/abstract_hardware_model.cc
index 0f4291d..450087b 100644
--- a/src/abstract_hardware_model.cc
+++ b/src/abstract_hardware_model.cc
@@ -693,7 +693,6 @@ void warp_inst_t::completed( unsigned long long cycle ) const
//Jin: CDP support
bool g_cdp_enabled;
-unsigned g_kernel_launch_latency;
unsigned kernel_info_t::m_next_uid = 1;
@@ -717,7 +716,7 @@ kernel_info_t::kernel_info_t( dim3 gridDim, dim3 blockDim, class function_info *
m_parent_kernel = NULL;
//Jin: launch latency management
- m_launch_latency = g_kernel_launch_latency;
+ m_launch_latency = entry->gpgpu_ctx->device_runtime->g_kernel_launch_latency;
volta_cache_config_set=false;
m_NameToCudaArray = nameToCudaArray;
diff --git a/src/cuda-sim/cuda_device_runtime.h b/src/cuda-sim/cuda_device_runtime.h
index a6303b9..5927b54 100644
--- a/src/cuda-sim/cuda_device_runtime.h
+++ b/src/cuda-sim/cuda_device_runtime.h
@@ -48,6 +48,7 @@ class cuda_device_runtime {
unsigned long long g_total_param_size;
std::map<void *, device_launch_config_t> g_cuda_device_launch_param_map;
std::list<device_launch_operation_t> g_cuda_device_launch_op;
+ unsigned g_kernel_launch_latency;
// backward pointer
class gpgpu_context* gpgpu_ctx;
#if (CUDART_VERSION >= 5000)
diff --git a/src/gpgpu-sim/gpu-sim.cc b/src/gpgpu-sim/gpu-sim.cc
index 93f041a..9726cf5 100644
--- a/src/gpgpu-sim/gpu-sim.cc
+++ b/src/gpgpu-sim/gpu-sim.cc
@@ -548,9 +548,8 @@ void gpgpu_sim_config::reg_options(option_parser_t opp)
ptx_file_line_stats_options(opp);
//Jin: kernel launch latency
- extern unsigned g_kernel_launch_latency;
option_parser_register(opp, "-gpgpu_kernel_launch_latency", OPT_INT32,
- &g_kernel_launch_latency, "Kernel launch latency in cycles. Default: 0",
+ &(gpgpu_ctx->device_runtime->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,