From 5236525aa1c242c901e24e6c50021e95ec499e0b Mon Sep 17 00:00:00 2001 From: JRPAN <25518778+JRPan@users.noreply.github.com> Date: Fri, 9 Aug 2024 18:37:26 -0400 Subject: [PATCH] remove GLOABL_TIMER --- src/abstract_hardware_model.cc | 1 - src/abstract_hardware_model.h | 1 - src/gpgpu-sim/gpu-sim.cc | 5 ++--- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/abstract_hardware_model.cc b/src/abstract_hardware_model.cc index 48f25104f..e8ddf95ab 100644 --- a/src/abstract_hardware_model.cc +++ b/src/abstract_hardware_model.cc @@ -208,7 +208,6 @@ gpgpu_t::gpgpu_t(const gpgpu_functional_sim_config &config, gpgpu_context *ctx) gpu_sim_cycle = 0; gpu_tot_sim_cycle = 0; - GLOBAL_TIMER = 0; } new_addr_type line_size_based_tag_func(new_addr_type address, diff --git a/src/abstract_hardware_model.h b/src/abstract_hardware_model.h index 78c2ae75b..02ae4baa3 100644 --- a/src/abstract_hardware_model.h +++ b/src/abstract_hardware_model.h @@ -600,7 +600,6 @@ class gpgpu_t { // Move some cycle core stats here instead of being global unsigned long long gpu_sim_cycle; unsigned long long gpu_tot_sim_cycle; - unsigned long long GLOBAL_TIMER; void *gpu_malloc(size_t size); void *gpu_mallocarray(size_t count); diff --git a/src/gpgpu-sim/gpu-sim.cc b/src/gpgpu-sim/gpu-sim.cc index 7b8f226c2..3396d2abf 100644 --- a/src/gpgpu-sim/gpu-sim.cc +++ b/src/gpgpu-sim/gpu-sim.cc @@ -791,7 +791,7 @@ void gpgpu_sim::launch(kernel_info_t *kinfo) { unsigned kernelID = kinfo->get_uid(); unsigned long long streamID = kinfo->get_streamID(); - kernel_time_t kernel_time = {GLOBAL_TIMER, 0}; + kernel_time_t kernel_time = {gpu_tot_sim_cycle + gpu_sim_cycle, 0}; if (gpu_kernel_time.find(streamID) == gpu_kernel_time.end()) { std::map new_val; new_val.insert(std::pair(kernelID, kernel_time)); ///// need fix @@ -921,7 +921,7 @@ void gpgpu_sim::set_kernel_done(kernel_info_t *kernel) { last_uid = uid; unsigned long long streamID = kernel->get_streamID(); last_streamID = streamID; - gpu_kernel_time.at(streamID).at(uid).end_cycle = GLOBAL_TIMER; + gpu_kernel_time.at(streamID).at(uid).end_cycle = gpu_tot_sim_cycle + gpu_sim_cycle; m_finished_kernel.push_back(uid); std::vector::iterator k; for (k = m_running_kernels.begin(); k != m_running_kernels.end(); k++) { @@ -2031,7 +2031,6 @@ void gpgpu_sim::cycle() { raise(SIGTRAP); // Debug breakpoint } gpu_sim_cycle++; - GLOBAL_TIMER++; if (g_interactive_debugger_enabled) gpgpu_debug();