From bb31988347b52956215d15aa1b9e9c3dd0d09908 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Wed, 25 Apr 2012 11:41:35 +1000 Subject: [PATCH] Detect poorly performing combination of SDK and phatk kernel and add verbose warning at startup. --- ocl.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ocl.c b/ocl.c index 39c88441..2b8155c1 100644 --- a/ocl.c +++ b/ocl.c @@ -372,8 +372,17 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize) clState->chosen_kernel = KL_PHATK; } gpus[gpu].kernel = clState->chosen_kernel; - } else + } else { clState->chosen_kernel = gpus[gpu].kernel; + if (clState->chosen_kernel == KL_PHATK && + (strstr(vbuff, "844.4") || strstr(vbuff, "851.4") || + strstr(vbuff, "831.4") || strstr(vbuff, "898.1"))) { + applog(LOG_WARNING, "WARNING: You have selected the phatk kernel."); + applog(LOG_WARNING, "You are running SDK 2.6 which performs poorly with this kernel."); + applog(LOG_WARNING, "Downgrade your SDK and delete any .bin files before starting again."); + applog(LOG_WARNING, "Or allow cgminer to automatically choose a more suitable kernel."); + } + } /* For some reason 2 vectors is still better even if the card says * otherwise, and many cards lie about their max so use 256 as max