mirror of
https://github.com/GOSTSec/sgminer
synced 2025-09-13 14:42:05 +00:00
Add hardware name to binary kernel name allowing for unique kernels for different cards on the same machine.
This commit is contained in:
parent
9950aa3927
commit
821da37c84
7
ocl.c
7
ocl.c
@ -334,7 +334,7 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
|
|||||||
/* Create binary filename based on parameters passed to opencl
|
/* Create binary filename based on parameters passed to opencl
|
||||||
* compiler to ensure we only load a binary that matches what would
|
* compiler to ensure we only load a binary that matches what would
|
||||||
* have otherwise created. The filename is:
|
* have otherwise created. The filename is:
|
||||||
* kernelname +/i bitalign + v + vectors + w + work_size + sizeof(long) + .bin
|
* name + kernelname +/i bitalign + v + vectors + w + work_size + sizeof(long) + .bin
|
||||||
*/
|
*/
|
||||||
char binaryfilename[255];
|
char binaryfilename[255];
|
||||||
char numbuf[10];
|
char numbuf[10];
|
||||||
@ -367,11 +367,12 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
strcpy(binaryfilename, name);
|
||||||
if (clState->hasBitAlign) {
|
if (clState->hasBitAlign) {
|
||||||
strcpy(binaryfilename, "phatk");
|
strcat(binaryfilename, "phatk");
|
||||||
strcat(binaryfilename, "bitalign");
|
strcat(binaryfilename, "bitalign");
|
||||||
} else
|
} else
|
||||||
strcpy(binaryfilename, "poclbm");
|
strcat(binaryfilename, "poclbm");
|
||||||
strcat(binaryfilename, "v");
|
strcat(binaryfilename, "v");
|
||||||
sprintf(numbuf, "%d", clState->preferred_vwidth);
|
sprintf(numbuf, "%d", clState->preferred_vwidth);
|
||||||
strcat(binaryfilename, numbuf);
|
strcat(binaryfilename, numbuf);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user