From 258ad919a4d584a665c1b1d40d7c5e00831d7288 Mon Sep 17 00:00:00 2001 From: "Andrew M. B. Boktor" Date: Thu, 6 Oct 2011 09:03:00 -0800 Subject: Integrated 9556: Fixed gpu_sim_cycle for sequential kernels. Now it resets after each kernel launch [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 10547] --- src/gpgpusim_entrypoint.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gpgpusim_entrypoint.cc b/src/gpgpusim_entrypoint.cc index ba3b9aa..add9a22 100644 --- a/src/gpgpusim_entrypoint.cc +++ b/src/gpgpusim_entrypoint.cc @@ -87,7 +87,7 @@ bool g_sim_done = true; void *gpgpu_sim_thread_concurrent(void*) { // concurrent kernel execution simulation thread - g_the_gpu->init(); + do { if(g_debug_execution >= 3) { printf("GPGPU-Sim: *** simulation thread starting and spinning waiting for work ***\n"); @@ -105,6 +105,7 @@ void *gpgpu_sim_thread_concurrent(void*) pthread_mutex_unlock(&g_sim_lock); bool active = false; bool sim_cycles = false; + g_the_gpu->init(); do { // check if a kernel has completed unsigned grid_uid = g_the_gpu->finished_kernel(); @@ -202,7 +203,7 @@ void start_sim_thread(int api) { if( g_sim_done ) { g_sim_done = false; - if( g_the_gpu_config.get_max_concurrent_kernel() > 1 && api == 1 ) { + if( api == 1 ) { pthread_create(&g_simulation_thread,NULL,gpgpu_sim_thread_concurrent,NULL); } else { pthread_create(&g_simulation_thread,NULL,gpgpu_sim_thread_sequential,NULL); -- cgit v1.3