summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilson Fung <[email protected]>2013-01-25 21:34:30 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:49:24 -0700
commitb3de117ec61c3b59dc386562dc821fed6627e38b (patch)
tree14cee447af99a371ae3019bdfef3491d54a34595
parent8c087fa6baa2268a2675c3fec772f2bd696f080e (diff)
Added kernel name and launch uids to the stat printout to simplify per-kernel stat binning.
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 15109]
-rw-r--r--CHANGES7
-rw-r--r--src/gpgpu-sim/gpu-sim.cc24
-rw-r--r--src/gpgpu-sim/gpu-sim.h3
3 files changed, 30 insertions, 4 deletions
diff --git a/CHANGES b/CHANGES
index 0df26b5..bbd2bde 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,11 +1,12 @@
LOG:
Version 3.2.0+edits (development branch) versus 3.2.0
+- Added kernel name and launch uids to performance statistics log.
- Bug Fixes:
- Applied patch from Kito Cheng to update libopencl for checking NULL error
code pointer.
- - Set the numeric locale before the parsing to a standard locale with the decimal point
- represented as "dot" not a "comma", so parsing is done correctly independent of the
- system locale.
+ - Set the numeric locale before the parsing to a standard locale with the
+ decimal point represented as "dot" not a "comma", so parsing is done
+ correctly independent of the system locale.
Version 3.2.0 versus 3.1.2
- Added GPUWattch GPGPU power model based on McPAT 0.8beta.
diff --git a/src/gpgpu-sim/gpu-sim.cc b/src/gpgpu-sim/gpu-sim.cc
index 76137fb..2eab0b9 100644
--- a/src/gpgpu-sim/gpu-sim.cc
+++ b/src/gpgpu-sim/gpu-sim.cc
@@ -449,6 +449,14 @@ kernel_info_t *gpgpu_sim::select_kernel()
unsigned idx = (n+m_last_issued_kernel+1)%m_config.max_concurrent_kernel;
if( m_running_kernels[idx] && !m_running_kernels[idx]->no_more_ctas_to_run() ) {
m_last_issued_kernel=idx;
+
+ // record this kernel for stat print if it is the first time this kernel is selected for execution
+ unsigned launch_uid = m_running_kernels[idx]->get_uid();
+ if (std::find(m_executed_kernel_uids.begin(), m_executed_kernel_uids.end(), launch_uid) == m_executed_kernel_uids.end()) {
+ m_executed_kernel_uids.push_back(launch_uid);
+ m_executed_kernel_names.push_back(m_running_kernels[idx]->name());
+ }
+
return m_running_kernels[idx];
}
}
@@ -706,6 +714,22 @@ void gpgpu_sim::deadlock_check()
void gpgpu_sim::gpu_print_stat()
{
+ FILE *statfout = stdout;
+
+ // printing the names and uids of a set of executed kernels (usually there is only one)
+ fprintf(statfout, "kernel_name = ");
+ for (unsigned int k = 0; k < m_executed_kernel_names.size(); k++) {
+ fprintf(statfout, "'%s' ", m_executed_kernel_names[k].c_str());
+ }
+ fprintf(statfout, "\n");
+ fprintf(statfout, "kernel_launch_uid = ");
+ for (unsigned int k = 0; k < m_executed_kernel_uids.size(); k++) {
+ fprintf(statfout, "%d ", m_executed_kernel_uids[k]);
+ }
+ fprintf(statfout, "\n");
+ m_executed_kernel_names.clear();
+ m_executed_kernel_uids.clear();
+
printf("gpu_sim_cycle = %lld\n", gpu_sim_cycle);
printf("gpu_sim_insn = %lld\n", gpu_sim_insn);
printf("gpu_ipc = %12.4f\n", (float)gpu_sim_insn / gpu_sim_cycle);
diff --git a/src/gpgpu-sim/gpu-sim.h b/src/gpgpu-sim/gpu-sim.h
index f8c2e2e..93b7b0c 100644
--- a/src/gpgpu-sim/gpu-sim.h
+++ b/src/gpgpu-sim/gpu-sim.h
@@ -457,7 +457,8 @@ private:
unsigned long long gpu_tot_issued_cta;
unsigned long long last_gpu_sim_insn;
-
+ std::vector<std::string> m_executed_kernel_names; //< names of kernel for stat printout
+ std::vector<unsigned> m_executed_kernel_uids; //< uids of kernel launches for stat printout
public: