Skip to content

Commit 9c51f93

Browse files
authored
Merge pull request gpgpu-sim#197 from cesar-avalos3/accel-sim
Add "Completed CTAs" in the Visualizer Log File
2 parents a701b7e + 3cd5b1b commit 9c51f93

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/gpgpu-sim/shader.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@ void shader_core_stats::visualizer_print(gzFile visualizer_file) {
748748
}
749749
gzprintf(visualizer_file, "\n");
750750

751+
gzprintf(visualizer_file, "ctas_completed: %d\n", ctas_completed);
752+
ctas_completed = 0;
751753
// warp issue breakdown
752754
unsigned sid = m_config->gpgpu_warp_issue_shader;
753755
unsigned count = 0;
@@ -2685,6 +2687,7 @@ void shader_core_ctx::register_cta_thread_exit(unsigned cta_num,
26852687
m_cta_status[cta_num]--;
26862688
if (!m_cta_status[cta_num]) {
26872689
// Increment the completed CTAs
2690+
m_stats->ctas_completed++;
26882691
m_gpu->inc_completed_cta();
26892692
m_n_active_cta--;
26902693
m_barriers.deallocate_barrier(cta_num);
@@ -2751,6 +2754,7 @@ void gpgpu_sim::shader_print_runtime_stat(FILE *fout) {
27512754

27522755
void gpgpu_sim::shader_print_scheduler_stat(FILE *fout,
27532756
bool print_dynamic_info) const {
2757+
fprintf(fout, "ctas_completed %d, ", m_shader_stats->ctas_completed);
27542758
// Print out the stats from the sampling shader core
27552759
const unsigned scheduler_sampling_core =
27562760
m_shader_config->gpgpu_warp_issue_shader;

src/gpgpu-sim/shader.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1668,6 +1668,7 @@ struct shader_core_stats_pod {
16681668
unsigned *single_issue_nums;
16691669
unsigned *dual_issue_nums;
16701670

1671+
unsigned ctas_completed;
16711672
// memory access classification
16721673
int gpgpu_n_mem_read_local;
16731674
int gpgpu_n_mem_write_local;
@@ -1781,6 +1782,7 @@ class shader_core_stats : public shader_core_stats_pod {
17811782
dual_issue_nums =
17821783
(unsigned *)calloc(config->gpgpu_num_sched_per_core, sizeof(unsigned));
17831784

1785+
ctas_completed = 0;
17841786
n_simt_to_mem = (long *)calloc(config->num_shader(), sizeof(long));
17851787
n_mem_to_simt = (long *)calloc(config->num_shader(), sizeof(long));
17861788

0 commit comments

Comments
 (0)