diff options
| author | Tayler Hetherington <[email protected]> | 2015-06-05 14:49:14 -0700 |
|---|---|---|
| committer | Tayler Hetherington <[email protected]> | 2015-06-05 14:49:14 -0700 |
| commit | 07b1e93f19bef20a9e35fcfc48b091fa36d56d1b (patch) | |
| tree | 0f8fa652aab482ae0487465f5c0ad34b16b7ae99 /src/gpgpu-sim/gpu-sim.h | |
| parent | 3ab52d670fbe4fc79eeba1c9a0061dba69fad3b5 (diff) | |
Fixing bug with max cycle/instruction/cta + bug with C++ name de-mangling with spaces (e.g., using templates)
Diffstat (limited to 'src/gpgpu-sim/gpu-sim.h')
| -rw-r--r-- | src/gpgpu-sim/gpu-sim.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gpgpu-sim/gpu-sim.h b/src/gpgpu-sim/gpu-sim.h index 4e6b7a5..33fffd3 100644 --- a/src/gpgpu-sim/gpu-sim.h +++ b/src/gpgpu-sim/gpu-sim.h @@ -372,10 +372,16 @@ public: bool can_start_kernel(); unsigned finished_kernel(); void set_kernel_done( kernel_info_t *kernel ); + void stop_all_running_kernels(); void init(); void cycle(); bool active(); + bool cycle_insn_cta_max_hit() { + return (m_config.gpu_max_cycle_opt && (gpu_tot_sim_cycle + gpu_sim_cycle) >= m_config.gpu_max_cycle_opt) || + (m_config.gpu_max_insn_opt && (gpu_tot_sim_insn + gpu_sim_insn) >= m_config.gpu_max_insn_opt) || + (m_config.gpu_max_cta_opt && (gpu_tot_issued_cta >= m_config.gpu_max_cta_opt) ); + } void print_stats(); void update_stats(); void deadlock_check(); @@ -391,6 +397,8 @@ public: unsigned threads_per_core() const; bool get_more_cta_left() const; + bool kernel_more_cta_left(kernel_info_t *kernel) const; + bool hit_max_cta_count() const; kernel_info_t *select_kernel(); const gpgpu_sim_config &get_config() const { return m_config; } @@ -445,7 +453,10 @@ private: unsigned m_last_issued_kernel; std::list<unsigned> m_finished_kernel; - unsigned m_total_cta_launched; + // m_total_cta_launched == per-kernel count. gpu_tot_issued_cta == global count. + unsigned long long m_total_cta_launched; + unsigned long long gpu_tot_issued_cta; + unsigned m_last_cluster_issue; float * average_pipeline_duty_cycle; float * active_sms; @@ -470,7 +481,6 @@ private: class memory_stats_t *m_memory_stats; class power_stat_t *m_power_stats; class gpgpu_sim_wrapper *m_gpgpusim_wrapper; - unsigned long long gpu_tot_issued_cta; unsigned long long last_gpu_sim_insn; unsigned long long last_liveness_message_time; @@ -488,8 +498,6 @@ public: unsigned long long gpu_sim_insn_last_update; unsigned gpu_sim_insn_last_update_sid; - - FuncCache get_cache_config(std::string kernel_name); void set_cache_config(std::string kernel_name, FuncCache cacheConfig ); bool has_special_cache_config(std::string kernel_name); |
