summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim/gpu-sim.cc
diff options
context:
space:
mode:
authorMengchi Zhang <[email protected]>2019-07-16 10:36:42 -0400
committerGitHub <[email protected]>2019-07-16 10:36:42 -0400
commitbf198b13541a427cba9bef22799955aa08ab050a (patch)
tree4af15f4e22cb0c55450e26cb97110534148c8c60 /src/gpgpu-sim/gpu-sim.cc
parent89e913f7b28e342b9023a01105cb441cfafbee8b (diff)
parente1fa1a3cc7c509417064a8e4cdab71e3f7feb881 (diff)
Merge pull request #25 from echoedit/dev
Dev
Diffstat (limited to 'src/gpgpu-sim/gpu-sim.cc')
-rw-r--r--src/gpgpu-sim/gpu-sim.cc17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/gpgpu-sim/gpu-sim.cc b/src/gpgpu-sim/gpu-sim.cc
index 93f041a..e4ae04f 100644
--- a/src/gpgpu-sim/gpu-sim.cc
+++ b/src/gpgpu-sim/gpu-sim.cc
@@ -545,16 +545,14 @@ void gpgpu_sim_config::reg_options(option_parser_t opp)
option_parser_register(opp, "-trace_sampling_memory_partition", OPT_INT32,
&Trace::sampling_memory_partition, "The memory partition which is printed using MEMPART_DPRINTF. Default -1 (i.e. all)",
"-1");
- ptx_file_line_stats_options(opp);
+ gpgpu_ctx->stats->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,
- &g_cdp_enabled, "Turn on CDP",
+ &(gpgpu_ctx->device_runtime->g_cdp_enabled), "Turn on CDP",
"0");
}
@@ -888,7 +886,7 @@ void gpgpu_sim::init()
m_shader_stats->new_grid();
// initialize the control-flow, memory access, memory latency logger
if (m_config.g_visualizer_enabled) {
- create_thread_CFlogger( m_config.num_shader(), m_shader_config->n_thread_per_shader, 0, m_config.gpgpu_cflog_interval );
+ create_thread_CFlogger( gpgpu_ctx, m_config.num_shader(), m_shader_config->n_thread_per_shader, 0, m_config.gpgpu_cflog_interval );
}
shader_CTA_count_create( m_config.num_shader(), m_config.gpgpu_cflog_interval);
if (m_config.gpgpu_cflog_interval != 0) {
@@ -934,7 +932,7 @@ void gpgpu_sim::update_stats() {
void gpgpu_sim::print_stats()
{
- ptx_file_line_stats_write_file();
+ gpgpu_ctx->stats->ptx_file_line_stats_write_file();
gpu_print_stat();
if (g_network_mode) {
@@ -1107,8 +1105,7 @@ void gpgpu_sim::gpu_print_stat()
printf("gpu_tot_occupancy = %.4f\% \n", (gpu_occupancy + gpu_tot_occupancy).get_occ_fraction() * 100);
- extern unsigned long long g_max_total_param_size;
- fprintf(statfout, "max_total_param_size = %llu\n", g_max_total_param_size);
+ fprintf(statfout, "max_total_param_size = %llu\n", gpgpu_ctx->device_runtime->g_max_total_param_size);
// performance counter for stalls due to congestion.
printf("gpu_stall_dramfull = %d\n", gpu_stall_dramfull);
@@ -1831,7 +1828,7 @@ const shader_core_config * gpgpu_sim::getShaderCoreConfig()
return m_shader_config;
}
-const struct memory_config * gpgpu_sim::getMemoryConfig()
+const memory_config * gpgpu_sim::getMemoryConfig()
{
return m_memory_config;
}