diff options
| author | Tayler Hetherington <[email protected]> | 2013-06-18 11:50:29 -0800 |
|---|---|---|
| committer | Andrew Boktor <[email protected]> | 2014-08-14 13:50:48 -0700 |
| commit | a862a16b2d8e77fc5279adc02578e4ad35422f38 (patch) | |
| tree | e619e93f1ffc3d2cba54474f8bd74c3a7f3bd161 /src/gpgpusim_entrypoint.cc | |
| parent | d79fab8098036dcad4628c21d61258195721e2a2 (diff) | |
Review: 47001. Fixing bug in CL16463. When streams are actually used, kernels can complete while other kernels are still running. The fix in CL16463 caused the GPU to re-initialize when a kernel completes, which may occur while another kernel is still running. Added a check to test if the GPU is also inactive when a kernel completes in order to re-initialize. simpleStreams CUDA SDK now passes with CUDA 3.1.
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 16469]
Diffstat (limited to 'src/gpgpusim_entrypoint.cc')
| -rw-r--r-- | src/gpgpusim_entrypoint.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gpgpusim_entrypoint.cc b/src/gpgpusim_entrypoint.cc index 20fb88e..28f909b 100644 --- a/src/gpgpusim_entrypoint.cc +++ b/src/gpgpusim_entrypoint.cc @@ -122,8 +122,9 @@ void *gpgpu_sim_thread_concurrent(void*) // If another stream operation is available, g_the_gpu remains active, // causing this loop to not break. If the next operation happens to be // another kernel, the gpu is not re-initialized and the inter-kernel - // behaviour may be incorrect. - if(g_stream_manager->operation(&sim_cycles)) + // behaviour may be incorrect. Check that a kernel has finished and + // no other kernel is currently running. + if(g_stream_manager->operation(&sim_cycles) && !g_the_gpu->active()) break; if( g_the_gpu->active() ) { |
