summaryrefslogtreecommitdiff
path: root/libopencl/opencl_runtime_api.cc
diff options
context:
space:
mode:
authorTim Rogers <[email protected]>2011-11-29 14:39:47 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:19:01 -0700
commite93c5427e1d27f5afd8033063ae2c7a3853aacee (patch)
treecc1c5a75118a728b0fdc572f13443ea048720f28 /libopencl/opencl_runtime_api.cc
parentbf41c3cd7b96e94389333f5585605a11db5d9d4e (diff)
Adding support to change the directory on the remote opencl compilation
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 11052]
Diffstat (limited to 'libopencl/opencl_runtime_api.cc')
-rw-r--r--libopencl/opencl_runtime_api.cc5
1 files changed, 4 insertions, 1 deletions
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