summaryrefslogtreecommitdiff
path: root/src/cuda-sim
diff options
context:
space:
mode:
authorTor Aamodt <[email protected]>2010-12-28 14:09:12 -0800
committerTor Aamodt <[email protected]>2010-12-28 14:09:12 -0800
commite7b3dd442fceb30eaa8008d97429a1d33dad2044 (patch)
tree3f1a9da5de24518bc9859283d46e8e83614e668c /src/cuda-sim
parentd864c51b9fee6b2808e4752a556d6de4ba376b7c (diff)
- Checkpointing new support for concurrent kernel execution (CUDA only, not OpenCL)
This changelist adds full support for streams supported by a new class, stream_manager and enables concurrent execution of kernels from different streams. - fast_regression.sh fails for simpleMultiCopy, simpleStreams (other tests passing) ** Known issues ** - Kernel parameter passing is not done correctly for concurrent kernel execution (somehow concurrentKernels is not affected by this): the parameters are stored inside function_info, which is shared among parallel kernel launches so that the values passed into the launch are likely to get overwritten if multiple grids are launched in parallel streams. - Statistics are printed out whenever the simulation thread runs out of cuda commands (doesn't make sense to print out when a kernel ends during concurrent kernel execution). This will probably require further tweaking so as to be more compatible with data collection scripts. [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 8302]
Diffstat (limited to 'src/cuda-sim')
-rw-r--r--src/cuda-sim/cuda-sim.cc9
-rw-r--r--src/cuda-sim/cuda-sim.h2
2 files changed, 9 insertions, 2 deletions
diff --git a/src/cuda-sim/cuda-sim.cc b/src/cuda-sim/cuda-sim.cc
index 9b65c25..b6a15e8 100644
--- a/src/cuda-sim/cuda-sim.cc
+++ b/src/cuda-sim/cuda-sim.cc
@@ -1331,6 +1331,8 @@ int g_ptx_sim_mode; // if non-zero run functional simulation only (i.e., no noti
extern "C" int ptx_debug;
+bool g_cuda_launch_blocking = false;
+
void read_sim_environment_variables()
{
ptx_debug = 0;
@@ -1375,7 +1377,12 @@ void read_sim_environment_variables()
fflush(stdout);
g_override_embedded_ptx = true;
}
+ char *blocking = getenv("CUDA_LAUNCH_BLOCKING");
+ if( blocking && !strcmp(blocking,"1") ) {
+ g_cuda_launch_blocking = true;
+ }
#else
+ g_cuda_launch_blocking = true;
g_override_embedded_ptx = true;
#endif
@@ -1388,7 +1395,7 @@ ptx_cta_info *g_func_cta_info = NULL;
#define MAX(a,b) (((a)>(b))?(a):(b))
-void gpgpu_cuda_ptx_sim_main_func( kernel_info_t kernel, dim3 gridDim, dim3 blockDim, gpgpu_ptx_sim_arg_list_t args)
+void gpgpu_cuda_ptx_sim_main_func( kernel_info_t kernel )
{
printf("GPGPU-Sim: Performing Functional Simulation...\n");
diff --git a/src/cuda-sim/cuda-sim.h b/src/cuda-sim/cuda-sim.h
index e7c1965..ef045fb 100644
--- a/src/cuda-sim/cuda-sim.h
+++ b/src/cuda-sim/cuda-sim.h
@@ -25,7 +25,7 @@ extern class kernel_info_t gpgpu_opencl_ptx_sim_init_grid(class function_info *e
struct dim3 gridDim,
struct dim3 blockDim,
class gpgpu_t *gpu );
-extern void gpgpu_cuda_ptx_sim_main_func( kernel_info_t kernel, dim3 gridDim, dim3 blockDim, gpgpu_ptx_sim_arg_list_t args);
+extern void gpgpu_cuda_ptx_sim_main_func( kernel_info_t kernel );
extern void print_splash();
extern void gpgpu_ptx_sim_register_const_variable(void*, const char *deviceName, size_t size );
extern void gpgpu_ptx_sim_register_global_variable(void *hostVar, const char *deviceName, size_t size );