Skip to content

Commit

Permalink
remove GLOABL_TIMER
Browse files Browse the repository at this point in the history
  • Loading branch information
JRPan committed Aug 9, 2024
1 parent a3da652 commit 5236525
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/abstract_hardware_model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion src/abstract_hardware_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 2 additions & 3 deletions src/gpgpu-sim/gpu-sim.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<unsigned, kernel_time_t> new_val;
new_val.insert(std::pair<unsigned, kernel_time_t>(kernelID, kernel_time)); ///// need fix
Expand Down Expand Up @@ -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<kernel_info_t *>::iterator k;
for (k = m_running_kernels.begin(); k != m_running_kernels.end(); k++) {
Expand Down Expand Up @@ -2031,7 +2031,6 @@ void gpgpu_sim::cycle() {
raise(SIGTRAP); // Debug breakpoint
}
gpu_sim_cycle++;
GLOBAL_TIMER++;

if (g_interactive_debugger_enabled) gpgpu_debug();

Expand Down

0 comments on commit 5236525

Please sign in to comment.