Use only working kernels 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 44 45
diff --git a/ocl.c b/ocl.c
index 677d6ca..1cbb0fa 100644
--- a/ocl.c
+++ b/ocl.c
@@ -361,9 +361,7 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
char numbuf[10];
if (chosen_kernel == KL_NONE) {
- if (strstr(name, "Tahiti"))
- clState->chosen_kernel = KL_DIABLO;
- else if (!clState->hasBitAlign)
+ if (strstr(name, "Tahiti") || !clState->hasBitAlign)
clState->chosen_kernel = KL_POCLBM;
else
clState->chosen_kernel = KL_PHATK;
@@ -371,14 +369,6 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
clState->chosen_kernel = chosen_kernel;
switch (clState->chosen_kernel) {
- case KL_DIABLO:
- strcpy(filename, DIABLO_KERNNAME".cl");
- strcpy(binaryfilename, DIABLO_KERNNAME);
- break;
- case KL_DIAKGCN:
- strcpy(filename, DIAKGCN_KERNNAME".cl");
- strcpy(binaryfilename, DIAKGCN_KERNNAME);
- break;
case KL_POCLBM:
strcpy(filename, POCLBM_KERNNAME".cl");
strcpy(binaryfilename, POCLBM_KERNNAME);
@@ -388,6 +378,14 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
strcpy(filename, PHATK_KERNNAME".cl");
strcpy(binaryfilename, PHATK_KERNNAME);
break;
+ case KL_DIAKGCN:
+ strcpy(filename, DIAKGCN_KERNNAME".cl");
+ strcpy(binaryfilename, DIAKGCN_KERNNAME);
+ break;
+ case KL_DIABLO:
+ strcpy(filename, DIABLO_KERNNAME".cl");
+ strcpy(binaryfilename, DIABLO_KERNNAME);
+ break;
}
FILE *binaryfile;