diff options
| author | Akshay Jain <[email protected]> | 2018-03-21 13:40:06 -0400 |
|---|---|---|
| committer | Akshay Jain <[email protected]> | 2018-03-21 13:40:06 -0400 |
| commit | e87f15a76c5b3225911850fcdb4074c16682ae50 (patch) | |
| tree | b327b49b61f30e10fef0447f4fd7c8aa5673db00 | |
| parent | 2ac6898a8dc70592f016ef5f3a12b67135f9b8d1 (diff) | |
Change 124 by jain156@akshayj-lt1 on 2016/12/08 20:17:53
Added Memory divergence stats
Data shows same divergence characteristics across PTX and PTX+
| -rw-r--r-- | src/gpgpu-sim/shader.cc | 9 | ||||
| -rw-r--r-- | src/gpgpu-sim/shader.h | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc index bf482fb..72e0266 100644 --- a/src/gpgpu-sim/shader.cc +++ b/src/gpgpu-sim/shader.cc @@ -438,6 +438,9 @@ void shader_core_stats::print( FILE* fout ) const fprintf(fout,"gpgpu_n_mem_texture = %d\n", gpgpu_n_mem_texture); fprintf(fout,"gpgpu_n_mem_const = %d\n", gpgpu_n_mem_const); + fprintf(fout,"gpgpu_n_times_gmem_accesses_by_warps = %lld\n", gpgpu_n_times_gmem_accesses_by_warps); + fprintf(fout,"gpgpu_n_total_gmem_accesses_by_warps = %lld\n", gpgpu_n_total_gmem_accesses_by_warps); + fprintf(fout, "gpgpu_n_load_insn = %d\n", gpgpu_n_load_insn); fprintf(fout, "gpgpu_n_store_insn = %d\n", gpgpu_n_store_insn); fprintf(fout, "gpgpu_n_shmem_insn = %d\n", gpgpu_n_shmem_insn); @@ -740,9 +743,15 @@ void shader_core_ctx::fetch() void shader_core_ctx::func_exec_inst( warp_inst_t &inst ) { + unsigned starting_queue_size; execute_warp_inst_t(inst); if( inst.is_load() || inst.is_store() ) + starting_queue_size = inst.accessq_count(); inst.generate_mem_accesses(); + if ( inst.space.get_type() == global_space ) { + m_stats->gpgpu_n_times_gmem_accesses_by_warps++; + m_stats->gpgpu_n_total_gmem_accesses_by_warps += inst.accessq_count() - starting_queue_size; + } } void shader_core_ctx::issue_warp( register_set& pipe_reg_set, const warp_inst_t* next_inst, const active_mask_t &active_mask, unsigned warp_id ) diff --git a/src/gpgpu-sim/shader.h b/src/gpgpu-sim/shader.h index 5b41c06..2475677 100644 --- a/src/gpgpu-sim/shader.h +++ b/src/gpgpu-sim/shader.h @@ -1470,6 +1470,10 @@ struct shader_core_stats_pod { int gpgpu_n_mem_read_global; int gpgpu_n_mem_write_global; int gpgpu_n_mem_read_inst; + + //warps memory divergence count + unsigned long long gpgpu_n_times_gmem_accesses_by_warps; + unsigned long long gpgpu_n_total_gmem_accesses_by_warps; int gpgpu_n_mem_l2_writeback; int gpgpu_n_mem_l1_write_allocate; |
