summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-11-17 18:16:35 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-11-17 18:19:51 +0100
commit91e814f66f5561798902f767d64c4366b376a1d3 (patch)
treeb3ece7364c41eb9895fb4467b5e37a210d4b0897 /sc
parent3614d5546034eae34dd0cbf282e058e431ec7295 (diff)
add a way to blacklist known bad OpenCL compilers
the blacklisted compiler hangs while compiling the opencl-test kernels on the @38 tinderbox. Change-Id: Ice80253a5fbb66eef4bfb4a3efd881fc83c379b4
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/platforminfo.hxx1
-rw-r--r--sc/source/core/opencl/openclwrapper.cxx31
2 files changed, 31 insertions, 1 deletions
diff --git a/sc/inc/platforminfo.hxx b/sc/inc/platforminfo.hxx
index 7a48e110a7c2..71206e01a94b 100644
--- a/sc/inc/platforminfo.hxx
+++ b/sc/inc/platforminfo.hxx
@@ -23,6 +23,7 @@ struct SC_DLLPUBLIC OpenclDeviceInfo
void* device;
OUString maName;
OUString maVendor;
+ OUString maDriver;
size_t mnMemory;
size_t mnComputeUnits;
size_t mnFrequency;
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx
index b7e1f9143b35..8ca70d0019d4 100644
--- a/sc/source/core/opencl/openclwrapper.cxx
+++ b/sc/source/core/opencl/openclwrapper.cxx
@@ -698,6 +698,26 @@ int OpenclDevice::getOpenclState()
namespace {
+// based on crashes and hanging during kernel compilation
+bool checkForKnownBadCompilers(const OpenclDeviceInfo& rInfo)
+{
+
+ struct {
+ const char* pVendorName; const char* pDriverVersion;
+ } aBadOpenCLCompilers[] = {
+ { "Intel(R) Corporation", "9.17.10.2884" }
+ };
+
+ for(size_t i = 0; i < SAL_N_ELEMENTS(aBadOpenCLCompilers); ++i)
+ {
+ if(rInfo.maVendor == OUString::createFromAscii(aBadOpenCLCompilers[i].pVendorName) &&
+ rInfo.maDriver == OUString::createFromAscii(aBadOpenCLCompilers[i].pDriverVersion))
+ return true;
+ }
+
+ return false;
+}
+
void createDeviceInfo(cl_device_id aDeviceId, OpenclPlatformInfo& rPlatformInfo)
{
OpenclDeviceInfo aDeviceInfo;
@@ -736,6 +756,14 @@ void createDeviceInfo(cl_device_id aDeviceId, OpenclPlatformInfo& rPlatformInfo)
if(nState != CL_SUCCESS)
return;
+ char pDriver[DEVICE_NAME_LENGTH];
+ nState = clGetDeviceInfo(aDeviceId, CL_DRIVER_VERSION, DEVICE_NAME_LENGTH, pDriver, NULL);
+
+ if(nState != CL_SUCCESS)
+ return;
+
+ aDeviceInfo.maDriver = OUString::createFromAscii(pDriver);
+
bool bKhrFp64 = false;
bool bAmdFp64 = false;
checkDeviceForDoubleSupport(aDeviceId, bKhrFp64, bAmdFp64);
@@ -746,7 +774,8 @@ void createDeviceInfo(cl_device_id aDeviceId, OpenclPlatformInfo& rPlatformInfo)
aDeviceInfo.mnComputeUnits = nComputeUnits;
- rPlatformInfo.maDevices.push_back(aDeviceInfo);
+ if(!checkForKnownBadCompilers(aDeviceInfo))
+ rPlatformInfo.maDevices.push_back(aDeviceInfo);
}
bool createPlatformInfo(cl_platform_id nPlatformId, OpenclPlatformInfo& rPlatformInfo)