summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpgpu-sim')
-rw-r--r--src/gpgpu-sim/gpu-sim.cc3
-rw-r--r--src/gpgpu-sim/power_interface.cc3
-rw-r--r--src/gpgpu-sim/power_interface.h2
3 files changed, 7 insertions, 1 deletions
diff --git a/src/gpgpu-sim/gpu-sim.cc b/src/gpgpu-sim/gpu-sim.cc
index 3a8cdea..a6a365c 100644
--- a/src/gpgpu-sim/gpu-sim.cc
+++ b/src/gpgpu-sim/gpu-sim.cc
@@ -507,6 +507,9 @@ void gpgpu_sim::set_kernel_done( kernel_info_t *kernel )
break;
}
}
+#ifdef GPGPUSIM_POWER_MODEL
+ mcpat_reset_perf_count(m_gpgpusim_wrapper, true);
+#endif
assert( k != m_running_kernels.end() );
}
diff --git a/src/gpgpu-sim/power_interface.cc b/src/gpgpu-sim/power_interface.cc
index 4f8daca..4ff6cf2 100644
--- a/src/gpgpu-sim/power_interface.cc
+++ b/src/gpgpu-sim/power_interface.cc
@@ -123,3 +123,6 @@ void mcpat_cycle(const gpgpu_sim_config &config, const struct shader_core_config
//wrapper->close_files();
}
+void mcpat_reset_perf_count(class gpgpu_sim_wrapper *wrapper, bool do_print){
+ wrapper->reset_perf_counters(do_print);
+}
diff --git a/src/gpgpu-sim/power_interface.h b/src/gpgpu-sim/power_interface.h
index 9bce430..3d04b7e 100644
--- a/src/gpgpu-sim/power_interface.h
+++ b/src/gpgpu-sim/power_interface.h
@@ -38,6 +38,6 @@
void init_mcpat(const gpgpu_sim_config &config, class gpgpu_sim_wrapper *wrapper, unsigned stat_sample_freq, unsigned tot_inst, unsigned inst);
void mcpat_cycle(const gpgpu_sim_config &config, const struct shader_core_config *shdr_config, class gpgpu_sim_wrapper *wrapper, class power_stat_t *power_stats,
unsigned stat_sample_freq, unsigned tot_cycle, unsigned cycle, unsigned tot_inst, unsigned inst);
-
+void mcpat_reset_perf_count(class gpgpu_sim_wrapper *wrapper, bool do_print);
#endif /* POWER_INTERFACE_H_ */