summaryrefslogtreecommitdiff
path: root/src/gpgpusim_entrypoint.cc
diff options
context:
space:
mode:
authorgpgpu-sim <[email protected]>2016-09-05 17:02:04 -0700
committerGitHub <[email protected]>2016-09-05 17:02:04 -0700
commitbab2a234abfadc50cb14dadb01c10595ce6ad1ef (patch)
tree50b0af6609d308635c8c837b3b838b99517cc286 /src/gpgpusim_entrypoint.cc
parentc9852bfe00b508644e894c1ebc34d90081d907c5 (diff)
parent0421e45d3f8796bc9bf1ff3b62c05173f7862463 (diff)
Merge pull request #28 from jwang323/cdp_clean
Initial support of CUDA Dynamic Parallelism on GPGPUSim
Diffstat (limited to 'src/gpgpusim_entrypoint.cc')
-rw-r--r--src/gpgpusim_entrypoint.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gpgpusim_entrypoint.cc b/src/gpgpusim_entrypoint.cc
index 6ba38eb..04845e7 100644
--- a/src/gpgpusim_entrypoint.cc
+++ b/src/gpgpusim_entrypoint.cc
@@ -100,7 +100,7 @@ void *gpgpu_sim_thread_concurrent(void*)
printf("GPGPU-Sim: *** simulation thread starting and spinning waiting for work ***\n");
fflush(stdout);
}
- while( g_stream_manager->empty_protected() && !g_sim_done )
+ while( g_stream_manager->empty() && !g_sim_done )
;
if(g_debug_execution >= 3) {
printf("GPGPU-Sim: ** START simulation thread (detected work) **\n");
@@ -127,6 +127,15 @@ void *gpgpu_sim_thread_concurrent(void*)
if(g_stream_manager->operation(&sim_cycles) && !g_the_gpu->active())
break;
+ //functional simulation
+ if( g_the_gpu->is_functional_sim()) {
+ kernel_info_t * kernel = g_the_gpu->get_functional_kernel();
+ assert(kernel);
+ gpgpu_cuda_ptx_sim_main_func(*kernel);
+ g_the_gpu->finish_functional_sim(kernel);
+ }
+
+ //performance simulation
if( g_the_gpu->active() ) {
g_the_gpu->cycle();
sim_cycles = true;
@@ -144,6 +153,7 @@ void *gpgpu_sim_thread_concurrent(void*)
printf("GPGPU-Sim: ** STOP simulation thread (no work) **\n");
fflush(stdout);
}
+ g_the_gpu->print_stats();
if(sim_cycles) {
g_the_gpu->update_stats();
print_simulation_time();