Whitelist ATI SDK 2.6 to use the poclbm kernel by default.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
diff --git a/ocl.c b/ocl.c
index fa7e5ab..809510f 100644
--- a/ocl.c
+++ b/ocl.c
@@ -186,11 +186,11 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
_clState *clState = calloc(1, sizeof(_clState));
bool patchbfi = false, prog_built = false;
cl_platform_id platform = NULL;
+ char pbuff[256], vbuff[255];
cl_platform_id* platforms;
cl_device_id *devices;
cl_uint numPlatforms;
cl_uint numDevices;
- char pbuff[256];
cl_int status;
status = clGetPlatformIDs(0, NULL, &numPlatforms);
@@ -227,9 +227,9 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
status = clGetPlatformInfo(platform, CL_PLATFORM_NAME, sizeof(pbuff), pbuff, NULL);
if (status == CL_SUCCESS)
applog(LOG_INFO, "CL Platform name: %s", pbuff);
- status = clGetPlatformInfo(platform, CL_PLATFORM_VERSION, sizeof(pbuff), pbuff, NULL);
+ status = clGetPlatformInfo(platform, CL_PLATFORM_VERSION, sizeof(vbuff), vbuff, NULL);
if (status == CL_SUCCESS)
- applog(LOG_INFO, "CL Platform version: %s", pbuff);
+ applog(LOG_INFO, "CL Platform version: %s", vbuff);
status = clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 0, NULL, &numDevices);
if (status != CL_SUCCESS) {
@@ -356,7 +356,12 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
char numbuf[10];
if (chosen_kernel == KL_NONE) {
- if (strstr(name, "Tahiti") || !clState->hasBitAlign)
+ if (strstr(name, "Tahiti") // GCN
+ || !clState->hasBitAlign // Older Radeon & Nvidia
+ || strstr(vbuff, "844.4") // Linux 64 bit ATI 2.6 SDK
+ || strstr(vbuff, "851.4") // Windows 64 bit ""
+ || strstr(vbuff, "831.4") // Windows & Linux 32 bit ""
+ )
clState->chosen_kernel = KL_POCLBM;
else
clState->chosen_kernel = KL_PHATK;