Skip to content

Commit

Permalink
run set_dram_power_stats only when power model enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
JRPan committed Jul 12, 2024
1 parent 229edda commit 8e05bd9
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/gpgpu-sim/gpu-sim.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1905,16 +1905,18 @@ void gpgpu_sim::cycle() {
m_memory_partition_unit[i]
->dram_cycle(); // Issue the dram command (scheduler + delay model)
// Update performance counters for DRAM
m_memory_partition_unit[i]->set_dram_power_stats(
m_power_stats->pwr_mem_stat->n_cmd[CURRENT_STAT_IDX][i],
m_power_stats->pwr_mem_stat->n_activity[CURRENT_STAT_IDX][i],
m_power_stats->pwr_mem_stat->n_nop[CURRENT_STAT_IDX][i],
m_power_stats->pwr_mem_stat->n_act[CURRENT_STAT_IDX][i],
m_power_stats->pwr_mem_stat->n_pre[CURRENT_STAT_IDX][i],
m_power_stats->pwr_mem_stat->n_rd[CURRENT_STAT_IDX][i],
m_power_stats->pwr_mem_stat->n_wr[CURRENT_STAT_IDX][i],
m_power_stats->pwr_mem_stat->n_wr_WB[CURRENT_STAT_IDX][i],
m_power_stats->pwr_mem_stat->n_req[CURRENT_STAT_IDX][i]);
if (m_config.g_power_simulation_enabled) {
m_memory_partition_unit[i]->set_dram_power_stats(
m_power_stats->pwr_mem_stat->n_cmd[CURRENT_STAT_IDX][i],
m_power_stats->pwr_mem_stat->n_activity[CURRENT_STAT_IDX][i],
m_power_stats->pwr_mem_stat->n_nop[CURRENT_STAT_IDX][i],
m_power_stats->pwr_mem_stat->n_act[CURRENT_STAT_IDX][i],
m_power_stats->pwr_mem_stat->n_pre[CURRENT_STAT_IDX][i],
m_power_stats->pwr_mem_stat->n_rd[CURRENT_STAT_IDX][i],
m_power_stats->pwr_mem_stat->n_wr[CURRENT_STAT_IDX][i],
m_power_stats->pwr_mem_stat->n_wr_WB[CURRENT_STAT_IDX][i],
m_power_stats->pwr_mem_stat->n_req[CURRENT_STAT_IDX][i]);
}
}
}

Expand Down

0 comments on commit 8e05bd9

Please sign in to comment.