summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim
diff options
context:
space:
mode:
authorAhmed El-Shafiey <[email protected]>2013-04-11 01:10:40 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:50:45 -0700
commit3164bfc1910cf17e7dd4033cd07ac264f656336f (patch)
treef3165b4bfe45700fbca6b99de46e610aaa47480b /src/gpgpu-sim
parenta0bd12d85d2ed4014c191d15d0ebad02803abc6d (diff)
fixing a bug in the interconnect stats was introduced in CL15746
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 15781]
Diffstat (limited to 'src/gpgpu-sim')
-rw-r--r--src/gpgpu-sim/gpu-sim.cc8
-rw-r--r--src/gpgpu-sim/power_stat.cc10
-rw-r--r--src/gpgpu-sim/power_stat.h4
3 files changed, 14 insertions, 8 deletions
diff --git a/src/gpgpu-sim/gpu-sim.cc b/src/gpgpu-sim/gpu-sim.cc
index 0abe14a..c1f58bf 100644
--- a/src/gpgpu-sim/gpu-sim.cc
+++ b/src/gpgpu-sim/gpu-sim.cc
@@ -1065,10 +1065,12 @@ void gpgpu_sim::cycle()
if (m_cluster[i]->get_not_completed() || get_more_cta_left() ) {
m_cluster[i]->core_cycle();
*active_sms+=m_cluster[i]->get_n_active_sms();
-
+ unsigned temp=0;
+ unsigned temp2 = 0;
+ m_cluster[i]->set_icnt_stats(temp, temp2);
// Interconnect power stats: SIMT->MEM
- m_cluster[i]->set_icnt_stats(m_power_stats->pwr_mem_stat->n_simt_to_mem[0][i],
- m_power_stats->pwr_mem_stat->n_mem_to_simt[0][i]);
+ m_power_stats->pwr_mem_stat->n_simt_to_mem[0][i]=temp;
+ m_power_stats->pwr_mem_stat->n_mem_to_simt[0][i]=temp2;
}
}
float temp=0;
diff --git a/src/gpgpu-sim/power_stat.cc b/src/gpgpu-sim/power_stat.cc
index eb4cb31..034f7bb 100644
--- a/src/gpgpu-sim/power_stat.cc
+++ b/src/gpgpu-sim/power_stat.cc
@@ -96,8 +96,8 @@ void power_mem_stat_t::init(){
// Interconnect stats
//n_mem_to_simt[i] = (unsigned *)calloc(m_config->m_n_mem,sizeof(unsigned)); // Counted at memory partition
- n_mem_to_simt[i] = (unsigned *)calloc(m_core_config->n_simt_clusters*m_core_config->n_simt_cores_per_cluster,sizeof(unsigned)); // Counted at SM
- n_simt_to_mem[i] = (unsigned *)calloc(m_core_config->n_simt_clusters*m_core_config->n_simt_cores_per_cluster,sizeof(unsigned)); // Counted at SM
+ n_mem_to_simt[i] = (unsigned *)calloc(m_core_config->n_simt_clusters,sizeof(unsigned)); // Counted at SM
+ n_simt_to_mem[i] = (unsigned *)calloc(m_core_config->n_simt_clusters,sizeof(unsigned)); // Counted at SM
}
}
@@ -115,7 +115,7 @@ void power_mem_stat_t::save_stats(){
l1d_write_miss[1][i] = l1d_write_miss[0][i] ;
shmem_read_access[1][i] = shmem_read_access[0][i] ; // Shared memory access
- n_simt_to_mem[1][i] = n_simt_to_mem[0][i]; // Interconnect
+
}
for(unsigned i=0; i<m_config->m_n_mem; ++i){
@@ -131,8 +131,12 @@ void power_mem_stat_t::save_stats(){
n_rd[1][i] = n_rd[0][i];
n_wr[1][i] = n_wr[0][i];
n_req[1][i] = n_req[0][i];
+ }
+ for(unsigned i=0; i<m_core_config->n_simt_clusters;i++){
+ n_simt_to_mem[1][i] = n_simt_to_mem[0][i]; // Interconnect
n_mem_to_simt[1][i] = n_mem_to_simt[0][i]; // Interconnect
+
}
}
diff --git a/src/gpgpu-sim/power_stat.h b/src/gpgpu-sim/power_stat.h
index 299bf43..28909f0 100644
--- a/src/gpgpu-sim/power_stat.h
+++ b/src/gpgpu-sim/power_stat.h
@@ -587,7 +587,7 @@ public:
unsigned get_icnt_simt_to_mem(){
unsigned total=0;
- for(unsigned i=0; i<m_config->num_shader(); ++i){
+ for(unsigned i=0; i<m_config->n_simt_clusters; ++i){
total += (pwr_mem_stat->n_simt_to_mem[0][i] - pwr_mem_stat->n_simt_to_mem[1][i]);
}
return total;
@@ -595,7 +595,7 @@ public:
unsigned get_icnt_mem_to_simt(){
unsigned total=0;
- for(unsigned i=0; i<m_mem_config->m_n_mem; ++i){
+ for(unsigned i=0; i<m_config->n_simt_clusters; ++i){
total += (pwr_mem_stat->n_mem_to_simt[0][i] - pwr_mem_stat->n_mem_to_simt[1][i]);
}
return total;