OpenCL Runtime: Set OpenCL build option -O2 fixed for ROCm and AMDGPU-PRO using AMD_OCL_BUILD_OPTIONS_APPEND

This commit is contained in:
jsteube
2017-08-31 15:25:19 +02:00
parent d3b9febb30
commit 8ee75141ea
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -334,6 +334,10 @@ void setup_environment_variables ()
putenv ((char *) "DISPLAY=:0");
}
//We need to force this
//if (getenv ("AMD_OCL_BUILD_OPTIONS_APPEND") == NULL)
putenv ((char *) "AMD_OCL_BUILD_OPTIONS_APPEND=-O2");
if (getenv ("OCL_CODE_CACHE_ENABLE") == NULL)
putenv ((char *) "OCL_CODE_CACHE_ENABLE=0");