mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-05 19:44:21 +00:00
Use the SDK and hardware information to choose good performing default kernels.
This commit is contained in:
parent
71cbe8cd72
commit
dfcb98debf
21
ocl.c
21
ocl.c
@ -368,20 +368,27 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
|
|||||||
char numbuf[10];
|
char numbuf[10];
|
||||||
|
|
||||||
if (gpus[gpu].kernel == KL_NONE) {
|
if (gpus[gpu].kernel == KL_NONE) {
|
||||||
/* If no binary is available, and we have a card that suffers with diablo
|
if (strstr(vbuff, "844.4") || // Linux 64 bit ATI 2.6 SDK
|
||||||
* on SDK2.6, use the poclbm kernel instead if one has not been
|
|
||||||
* selected. */
|
|
||||||
if (strstr(name, "Tahiti") &&
|
|
||||||
(strstr(vbuff, "844.4") || // Linux 64 bit ATI 2.6 SDK
|
|
||||||
strstr(vbuff, "851.4") || // Windows 64 bit ""
|
strstr(vbuff, "851.4") || // Windows 64 bit ""
|
||||||
strstr(vbuff, "831.4"))) // Windows & Linux 32 bit ""
|
strstr(vbuff, "831.4")) { // Windows & Linux 32 bit ""
|
||||||
{
|
if (strstr(name, "Tahiti")) {
|
||||||
applog(LOG_INFO, "Selecting poclbm kernel");
|
applog(LOG_INFO, "Selecting poclbm kernel");
|
||||||
clState->chosen_kernel = KL_POCLBM;
|
clState->chosen_kernel = KL_POCLBM;
|
||||||
} else {
|
} else {
|
||||||
applog(LOG_INFO, "Selecting diablo kernel");
|
applog(LOG_INFO, "Selecting diablo kernel");
|
||||||
clState->chosen_kernel = KL_DIABLO;
|
clState->chosen_kernel = KL_DIABLO;
|
||||||
}
|
}
|
||||||
|
} else if (strstr(vbuff, "898.1")) { // Windows 64 bit 12.2 driver
|
||||||
|
applog(LOG_INFO, "Selecting diablo kernel");
|
||||||
|
clState->chosen_kernel = KL_DIABLO;
|
||||||
|
} else if (clState->hasBitAlign) {
|
||||||
|
applog(LOG_INFO, "Selecting phatk kernel");
|
||||||
|
clState->chosen_kernel = KL_PHATK;
|
||||||
|
} else {
|
||||||
|
applog(LOG_INFO, "Selecting poclbm kernel");
|
||||||
|
clState->chosen_kernel = KL_POCLBM;
|
||||||
|
}
|
||||||
|
|
||||||
gpus[gpu].kernel = clState->chosen_kernel;
|
gpus[gpu].kernel = clState->chosen_kernel;
|
||||||
} else
|
} else
|
||||||
clState->chosen_kernel = gpus[gpu].kernel;
|
clState->chosen_kernel = gpus[gpu].kernel;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user