diff options
Diffstat (limited to 'libopencl/opencl_runtime_api.cc')
| -rw-r--r-- | libopencl/opencl_runtime_api.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libopencl/opencl_runtime_api.cc b/libopencl/opencl_runtime_api.cc index 91505ab..8c9819b 100644 --- a/libopencl/opencl_runtime_api.cc +++ b/libopencl/opencl_runtime_api.cc @@ -463,8 +463,19 @@ void _cl_program::Build(const char *options) setenv("LD_LIBRARY_PATH",nvopencl_libdir,1); char commandline[1024]; const char *opt = options?options:""; - snprintf(commandline,1024,"%s/libopencl/bin/nvopencl_wrapper %s %s %s", + const char* test_dir = getenv( "OPENCL_CURRENT_TEST_PATH" ); + const char* remote_host = getenv( "OPENCL_REMOTE_GPU_HOST" ); + if ( remote_host && test_dir ) + { + snprintf(commandline,1024,"ssh %s \"%s/libopencl/bin/nvopencl_wrapper %s/%s %s/%s %s\"", + remote_host, gpgpusim_opencl_path, test_dir, cl_fname, test_dir, ptx_fname, opt ); + } + else + { + snprintf(commandline,1024,"%s/libopencl/bin/nvopencl_wrapper %s %s %s", gpgpusim_opencl_path, cl_fname, ptx_fname, opt ); + } + int result = system(commandline); setenv("LD_LIBRARY_PATH",ld_library_path_orig,1); if( result != 0 ) { |
