summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim
diff options
context:
space:
mode:
authortgrogers <[email protected]>2018-10-07 21:41:35 -0400
committertgrogers <[email protected]>2018-10-07 21:41:35 -0400
commitafb28556c4f08e4daca17525e7e377d9aaec0ee5 (patch)
treeab1d03b510b4fabe8138c0fdf2ed9bf8cb473582 /src/gpgpu-sim
parent2ca656ae40436929f3d1261acabbd1c13db8470a (diff)
Unrolling Aksahy's stats - as they seem to be really screwing things up.
Diffstat (limited to 'src/gpgpu-sim')
-rw-r--r--src/gpgpu-sim/gpu-sim.cc10
-rw-r--r--src/gpgpu-sim/gpu-sim.h3
-rw-r--r--src/gpgpu-sim/l2cache.cc20
-rw-r--r--src/gpgpu-sim/l2cache.h8
-rw-r--r--src/gpgpu-sim/shader.cc35
-rw-r--r--src/gpgpu-sim/shader.h22
6 files changed, 12 insertions, 86 deletions
diff --git a/src/gpgpu-sim/gpu-sim.cc b/src/gpgpu-sim/gpu-sim.cc
index e437c63..08d4525 100644
--- a/src/gpgpu-sim/gpu-sim.cc
+++ b/src/gpgpu-sim/gpu-sim.cc
@@ -463,7 +463,7 @@ void gpgpu_sim_config::reg_options(option_parser_t opp)
"1");
option_parser_register(opp, "-gpgpu_ptx_instruction_classification", OPT_INT32,
&gpgpu_ptx_instruction_classification,
- "if enabled will classify ptx instruction types per kernel (Max 1024 kernels now)",
+ "if enabled will classify ptx instruction types per kernel (Max 255 kernels now)",
"0");
option_parser_register(opp, "-gpgpu_ptx_sim_mode", OPT_INT32, &g_ptx_sim_mode,
"Select between Performance (default) or Functional simulation (1)",
@@ -686,7 +686,7 @@ gpgpu_sim::gpgpu_sim( const gpgpu_sim_config &config )
m_memory_partition_unit = new memory_partition_unit*[m_memory_config->m_n_mem];
m_memory_sub_partition = new memory_sub_partition*[m_memory_config->m_n_mem_sub_partition];
for (unsigned i=0;i<m_memory_config->m_n_mem;i++) {
- m_memory_partition_unit[i] = new memory_partition_unit(i, m_memory_config, m_memory_stats, this);
+ m_memory_partition_unit[i] = new memory_partition_unit(i, m_memory_config, m_memory_stats);
for (unsigned p = 0; p < m_memory_config->m_n_sub_partition_per_memory_channel; p++) {
unsigned submpid = i * m_memory_config->m_n_sub_partition_per_memory_channel + p;
m_memory_sub_partition[submpid] = m_memory_partition_unit[i]->get_sub_partition(p);
@@ -1069,7 +1069,6 @@ void gpgpu_sim::gpu_print_stat()
shader_print_scheduler_stat( stdout, false );
m_shader_stats->print(stdout);
- m_power_stats->print(stdout);
#ifdef GPGPUSIM_POWER_MODEL
if(m_config.g_power_simulation_enabled){
m_gpgpusim_wrapper->print_power_kernel_stats(gpu_sim_cycle, gpu_tot_sim_cycle, gpu_tot_sim_insn + gpu_sim_insn, kernel_info_str, true );
@@ -1122,9 +1121,8 @@ void gpgpu_sim::gpu_print_stat()
insn_warp_occ_print(stdout);
}
if ( gpgpu_ptx_instruction_classification ) {
- StatDisp( g_inst_classification_stat[g_ptx_kernel_count_prev]);
- StatDisp( g_inst_mem_classification_stat[g_ptx_kernel_count_prev]);
- StatDisp( g_inst_op_classification_stat[g_ptx_kernel_count_prev]);
+ StatDisp( g_inst_classification_stat[g_ptx_kernel_count]);
+ StatDisp( g_inst_op_classification_stat[g_ptx_kernel_count]);
}
#ifdef GPGPUSIM_POWER_MODEL
diff --git a/src/gpgpu-sim/gpu-sim.h b/src/gpgpu-sim/gpu-sim.h
index f9b5dad..1778008 100644
--- a/src/gpgpu-sim/gpu-sim.h
+++ b/src/gpgpu-sim/gpu-sim.h
@@ -36,7 +36,6 @@
#include <iostream>
#include <fstream>
#include <list>
-#include <unordered_set>
#include <stdio.h>
@@ -429,8 +428,6 @@ public:
void perf_memcpy_to_gpu( size_t dst_start_addr, size_t count );
- std::unordered_set<unsigned long long> data_footprint_stats;
-
//The next three functions added to be used by the functional simulation function
//! Get shader core configuration
diff --git a/src/gpgpu-sim/l2cache.cc b/src/gpgpu-sim/l2cache.cc
index 596e07c..25da107 100644
--- a/src/gpgpu-sim/l2cache.cc
+++ b/src/gpgpu-sim/l2cache.cc
@@ -62,16 +62,15 @@ mem_fetch * partition_mf_allocator::alloc(new_addr_type addr, mem_access_type ty
memory_partition_unit::memory_partition_unit( unsigned partition_id,
const struct memory_config *config,
- class memory_stats_t *stats,
- class gpgpu_sim *gpu)
-: m_id(partition_id), m_config(config), m_stats(stats), m_arbitration_metadata(config), m_gpu(gpu)
+ class memory_stats_t *stats )
+: m_id(partition_id), m_config(config), m_stats(stats), m_arbitration_metadata(config)
{
m_dram = new dram_t(m_id,m_config,m_stats,this);
m_sub_partition = new memory_sub_partition*[m_config->m_n_sub_partition_per_memory_channel];
for (unsigned p = 0; p < m_config->m_n_sub_partition_per_memory_channel; p++) {
unsigned sub_partition_id = m_id * m_config->m_n_sub_partition_per_memory_channel + p;
- m_sub_partition[p] = new memory_sub_partition(sub_partition_id, m_config, stats, m_gpu);
+ m_sub_partition[p] = new memory_sub_partition(sub_partition_id, m_config, stats);
}
}
@@ -311,13 +310,11 @@ void memory_partition_unit::print( FILE *fp ) const
memory_sub_partition::memory_sub_partition( unsigned sub_partition_id,
const struct memory_config *config,
- class memory_stats_t *stats ,
- class gpgpu_sim *gpu)
+ class memory_stats_t *stats )
{
m_id = sub_partition_id;
m_config=config;
m_stats=stats;
- m_gpu=gpu;
m_memcpy_cycle_offset = 0;
assert(m_id < m_config->m_n_mem_sub_partition);
@@ -414,15 +411,6 @@ void memory_sub_partition::cache_cycle( unsigned cycle )
bool read_sent = was_read_sent(events);
MEM_SUBPART_DPRINTF("Probing L2 cache Address=%llx, status=%u\n", mf->get_addr(), status);
- if ( (mf->get_access_type() == GLOBAL_ACC_R) ||
- (mf->get_access_type() == GLOBAL_ACC_W) ||
- (mf->get_access_type() == LOCAL_ACC_R) ||
- (mf->get_access_type() == LOCAL_ACC_W) ||
- (mf->get_access_type() == CONST_ACC_R) ) {
- if (!m_gpu->data_footprint_stats.count(mf->get_addr()))
- m_gpu->data_footprint_stats.insert(mf->get_addr());
- }
-
if ( status == HIT ) {
if( !write_sent ) {
// L2 cache replies
diff --git a/src/gpgpu-sim/l2cache.h b/src/gpgpu-sim/l2cache.h
index 685b1d3..18c0a8b 100644
--- a/src/gpgpu-sim/l2cache.h
+++ b/src/gpgpu-sim/l2cache.h
@@ -58,7 +58,7 @@ private:
class memory_partition_unit
{
public:
- memory_partition_unit( unsigned partition_id, const struct memory_config *config, class memory_stats_t *stats , class gpgpu_sim *gpu);
+ memory_partition_unit( unsigned partition_id, const struct memory_config *config, class memory_stats_t *stats );
~memory_partition_unit();
bool busy() const;
@@ -93,8 +93,6 @@ public:
unsigned get_mpid() const { return m_id; }
- gpgpu_sim *m_gpu;
-
private:
unsigned m_id;
@@ -147,7 +145,7 @@ private:
class memory_sub_partition
{
public:
- memory_sub_partition( unsigned sub_partition_id, const struct memory_config *config, class memory_stats_t *stats, class gpgpu_sim *gpu);
+ memory_sub_partition( unsigned sub_partition_id, const struct memory_config *config, class memory_stats_t *stats );
~memory_sub_partition();
unsigned get_id() const { return m_id; }
@@ -188,8 +186,6 @@ public:
m_memcpy_cycle_offset += 1;
}
- gpgpu_sim *m_gpu;
-
private:
// data
unsigned m_id; //< the global sub partition ID
diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc
index 80ac07e..0e2e1c2 100644
--- a/src/gpgpu-sim/shader.cc
+++ b/src/gpgpu-sim/shader.cc
@@ -438,22 +438,6 @@ 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_mem_divergence_hist ");
- gpgpu_mem_divergence_hist->fprint(fout);
- fprintf(fout,"\n");
- fprintf(fout,"gpgpu_gmem_ld_divergence_hist ");
- gpgpu_gmem_ld_divergence_hist->fprint(fout);
- fprintf(fout,"\n");
- fprintf(fout,"gpgpu_gmem_st_divergence_hist ");
- gpgpu_gmem_st_divergence_hist->fprint(fout);
- fprintf(fout,"\n");
- fprintf(fout,"gpgpu_shmem_divergence_hist ");
- gpgpu_shmem_divergence_hist->fprint(fout);
- fprintf(fout,"\n");
- fprintf(fout,"warp_inst_classification ");
- warp_inst_classification->fprint(fout);
- fprintf(fout,"\n");
-
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);
@@ -756,26 +740,9 @@ 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.op_classification) {
- m_stats->warp_inst_classification->add2bin(inst.op_classification);
- }
- if( inst.is_load() || inst.is_store() ) {
- starting_queue_size = inst.accessq_count();
+ if( inst.is_load() || inst.is_store() )
inst.generate_mem_accesses();
- if ( inst.space.get_type() == global_space ) {
- if (inst.is_load())
- m_stats->gpgpu_gmem_ld_divergence_hist->add2bin(inst.accessq_count() - starting_queue_size);
- else if (inst.is_store())
- m_stats->gpgpu_gmem_st_divergence_hist->add2bin(inst.accessq_count() - starting_queue_size);
- }
- else if ( inst.space.get_type() == shared_space ) {
- m_stats->gpgpu_shmem_divergence_hist->add2bin(inst.get_cycles());
- }
-
- m_stats->gpgpu_mem_divergence_hist->add2bin(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 6a40aee..e07096e 100644
--- a/src/gpgpu-sim/shader.h
+++ b/src/gpgpu-sim/shader.h
@@ -53,8 +53,6 @@
#include "stats.h"
#include "gpu-cache.h"
#include "traffic_breakdown.h"
-#include "histogram.h"
-
@@ -1480,15 +1478,7 @@ struct shader_core_stats_pod {
int gpgpu_n_mem_read_global;
int gpgpu_n_mem_write_global;
int gpgpu_n_mem_read_inst;
-
- //warps combined memory divergence histogram
- linear_histogram* gpgpu_mem_divergence_hist;
- linear_histogram* gpgpu_gmem_ld_divergence_hist;
- linear_histogram* gpgpu_gmem_st_divergence_hist;
- linear_histogram* gpgpu_shmem_divergence_hist;
-
- linear_histogram* warp_inst_classification;
-
+
int gpgpu_n_mem_l2_writeback;
int gpgpu_n_mem_l1_write_allocate;
int gpgpu_n_mem_l2_write_allocate;
@@ -1557,12 +1547,6 @@ public:
m_incoming_traffic_stats = new traffic_breakdown("memtocore");
gpgpu_n_shmem_bank_access = (unsigned *)calloc(config->num_shader(), sizeof(unsigned));
- gpgpu_mem_divergence_hist = new linear_histogram(1, "", config->warp_size+1);
- gpgpu_gmem_ld_divergence_hist = new linear_histogram(1, "", config->warp_size+1);
- gpgpu_gmem_st_divergence_hist = new linear_histogram(1, "", config->warp_size+1);
- gpgpu_shmem_divergence_hist = new linear_histogram(1, "", config->warp_size+1);
-
- warp_inst_classification = new linear_histogram(1, "", 12);
m_shader_dynamic_warp_issue_distro.resize( config->num_shader() );
m_shader_warp_slot_issue_distro.resize( config->num_shader() );
@@ -1577,10 +1561,6 @@ public:
free(m_n_diverge);
free(shader_cycle_distro);
free(last_shader_cycle_distro);
- free(gpgpu_mem_divergence_hist);
- free(gpgpu_gmem_ld_divergence_hist);
- free(gpgpu_gmem_st_divergence_hist);
- free(warp_inst_classification);
}
void new_grid()