From 8ee75141ea0b0329aae2f185bdd978a1beb8ee06 Mon Sep 17 00:00:00 2001 From: jsteube Date: Thu, 31 Aug 2017 15:25:19 +0200 Subject: [PATCH] OpenCL Runtime: Set OpenCL build option -O2 fixed for ROCm and AMDGPU-PRO using AMD_OCL_BUILD_OPTIONS_APPEND --- docs/changes.txt | 1 + src/shared.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index a0e562c11..180147494 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -71,6 +71,7 @@ - OpenCL Kernels: Removed some include functions that are no longer needed to reduce compile time - OpenCL Runtime: Fall back to 64 threads default (from 256) on AMD GPU to prevent creating too many workitems - OpenCL Runtime: Forcing OpenCL 1.2 no longer needed. Option removed from build options +- OpenCL Runtime: Set OpenCL build option -O2 fixed for ROCm and AMDGPU-PRO using AMD_OCL_BUILD_OPTIONS_APPEND - Restore: Fixed the version number used in the restore file header - Time: added new type for time measurements hc_time_t and related functions to force the use of 64 bit times diff --git a/src/shared.c b/src/shared.c index 125c4c8a5..7171e297e 100644 --- a/src/shared.c +++ b/src/shared.c @@ -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");