summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim/stat-tool.h
diff options
context:
space:
mode:
authorTor Aamodt <[email protected]>2010-12-28 14:09:12 -0800
committerTor Aamodt <[email protected]>2010-12-28 14:09:12 -0800
commite7b3dd442fceb30eaa8008d97429a1d33dad2044 (patch)
tree3f1a9da5de24518bc9859283d46e8e83614e668c /src/gpgpu-sim/stat-tool.h
parentd864c51b9fee6b2808e4752a556d6de4ba376b7c (diff)
- Checkpointing new support for concurrent kernel execution (CUDA only, not OpenCL)
This changelist adds full support for streams supported by a new class, stream_manager and enables concurrent execution of kernels from different streams. - fast_regression.sh fails for simpleMultiCopy, simpleStreams (other tests passing) ** Known issues ** - Kernel parameter passing is not done correctly for concurrent kernel execution (somehow concurrentKernels is not affected by this): the parameters are stored inside function_info, which is shared among parallel kernel launches so that the values passed into the launch are likely to get overwritten if multiple grids are launched in parallel streams. - Statistics are printed out whenever the simulation thread runs out of cuda commands (doesn't make sense to print out when a kernel ends during concurrent kernel execution). This will probably require further tweaking so as to be more compatible with data collection scripts. [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 8302]
Diffstat (limited to 'src/gpgpu-sim/stat-tool.h')
-rw-r--r--src/gpgpu-sim/stat-tool.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/gpgpu-sim/stat-tool.h b/src/gpgpu-sim/stat-tool.h
index 00b7771..31a1dcb 100644
--- a/src/gpgpu-sim/stat-tool.h
+++ b/src/gpgpu-sim/stat-tool.h
@@ -118,7 +118,7 @@ public:
class thread_insn_span {
public:
- thread_insn_span(unsigned long long cycle, int n_insn);
+ thread_insn_span(unsigned long long cycle);
thread_insn_span(const thread_insn_span& other);
~thread_insn_span();
@@ -135,14 +135,13 @@ public:
private:
typedef my_hash_map<address_type, int> span_count_map;
unsigned long long m_cycle;
- int m_n_insn;
span_count_map m_insn_span_count;
};
class thread_CFlocality : public snap_shot_trigger, public spill_log_interface {
public:
thread_CFlocality(std::string name, unsigned long long snap_shot_interval,
- int nthreads, int n_insn, address_type start_pc, unsigned long long start_cycle = 0);
+ int nthreads, address_type start_pc, unsigned long long start_cycle = 0);
~thread_CFlocality();
void update_thread_pc( int thread_id, address_type pc );
@@ -170,9 +169,9 @@ private:
class insn_warp_occ_logger {
public:
- insn_warp_occ_logger(int simd_width, int n_insn)
+ insn_warp_occ_logger(int simd_width)
: m_simd_width(simd_width),
- m_insn_warp_occ(n_insn, linear_histogram(1, "", m_simd_width)),
+ m_insn_warp_occ(1,linear_histogram(1, "", m_simd_width)),
m_id(s_ids++) {}
insn_warp_occ_logger(const insn_warp_occ_logger& other)
@@ -191,7 +190,9 @@ public:
void set_id(int id) { m_id = id; }
void log(address_type pc, int warp_occ) {
- m_insn_warp_occ[pc].add2bin(warp_occ - 1);
+ if( pc >= m_insn_warp_occ.size() )
+ m_insn_warp_occ.resize(2*pc, linear_histogram(1, "", m_simd_width));
+ m_insn_warp_occ[pc].add2bin(warp_occ - 1);
}
void print(FILE *fout) const
@@ -307,7 +308,7 @@ void try_snap_shot (unsigned long long current_cycle);
void set_spill_interval (unsigned long long interval);
void spill_log_to_file (FILE *fout, int final, unsigned long long current_cycle);
-void create_thread_CFlogger( int n_loggers, int n_threads, int n_insn, address_type start_pc, unsigned long long logging_interval);
+void create_thread_CFlogger( int n_loggers, int n_threads, address_type start_pc, unsigned long long logging_interval);
void destroy_thread_CFlogger( );
void cflog_update_thread_pc( int logger_id, int thread_id, address_type pc );
void cflog_snapshot( int logger_id, unsigned long long cycle );
@@ -316,7 +317,7 @@ void cflog_print_path_expression(FILE *fout);
void cflog_visualizer_print(FILE *fout);
void cflog_visualizer_gzprint(gzFile fout);
-void insn_warp_occ_create( int n_loggers, int simd_width, int n_insn );
+void insn_warp_occ_create( int n_loggers, int simd_width );
void insn_warp_occ_log( int logger_id, address_type pc, int warp_occ );
void insn_warp_occ_print( FILE *fout );