Browse Source

Use only working kernels by default.

nfactor-troky
ckolivas 13 years ago committed by Con Kolivas
parent
commit
f2d5db0c77
  1. 20
      ocl.c

20
ocl.c

@ -361,9 +361,7 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
char numbuf[10]; char numbuf[10];
if (chosen_kernel == KL_NONE) { if (chosen_kernel == KL_NONE) {
if (strstr(name, "Tahiti")) if (strstr(name, "Tahiti") || !clState->hasBitAlign)
clState->chosen_kernel = KL_DIABLO;
else if (!clState->hasBitAlign)
clState->chosen_kernel = KL_POCLBM; clState->chosen_kernel = KL_POCLBM;
else else
clState->chosen_kernel = KL_PHATK; clState->chosen_kernel = KL_PHATK;
@ -371,14 +369,6 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
clState->chosen_kernel = chosen_kernel; clState->chosen_kernel = chosen_kernel;
switch (clState->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: case KL_POCLBM:
strcpy(filename, POCLBM_KERNNAME".cl"); strcpy(filename, POCLBM_KERNNAME".cl");
strcpy(binaryfilename, POCLBM_KERNNAME); strcpy(binaryfilename, POCLBM_KERNNAME);
@ -388,6 +378,14 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
strcpy(filename, PHATK_KERNNAME".cl"); strcpy(filename, PHATK_KERNNAME".cl");
strcpy(binaryfilename, PHATK_KERNNAME); strcpy(binaryfilename, PHATK_KERNNAME);
break; 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; FILE *binaryfile;

Loading…
Cancel
Save