From e93c5427e1d27f5afd8033063ae2c7a3853aacee Mon Sep 17 00:00:00 2001 From: Tim Rogers Date: Tue, 29 Nov 2011 14:39:47 -0800 Subject: Adding support to change the directory on the remote opencl compilation [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 11052] --- libopencl/opencl_runtime_api.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libopencl') diff --git a/libopencl/opencl_runtime_api.cc b/libopencl/opencl_runtime_api.cc index 2f71848..70d6f16 100644 --- a/libopencl/opencl_runtime_api.cc +++ b/libopencl/opencl_runtime_api.cc @@ -462,7 +462,10 @@ void _cl_program::Build(const char *options) char commandline[1024]; const char *opt = options?options:""; - const char* test_dir = getenv( "PWD" ); + const char* test_dir = getenv( "OPENCL_REMOTE_DIRECTORY" ); + if ( !test_dir || strncmp( test_dir, "", 1 ) == 0 ) { + test_dir = getenv( "PWD" ); + } const char* remote_host = getenv( "OPENCL_REMOTE_GPU_HOST" ); if ( remote_host && test_dir ) { // create same directory on OpenCL to PTX server -- cgit v1.3