mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-23 04:54:26 +00:00
Display all OpenCL devices when -n is called as well to allow debugging of differential mapping of OpenCL to ADL.
This commit is contained in:
parent
f5f089f5b4
commit
9175e4f25c
12
ocl.c
12
ocl.c
@ -123,6 +123,18 @@ int clDevicesNum(void) {
|
|||||||
applog(LOG_INFO, "Platform %d devices: %d", i, numDevices);
|
applog(LOG_INFO, "Platform %d devices: %d", i, numDevices);
|
||||||
if (numDevices > most_devices)
|
if (numDevices > most_devices)
|
||||||
most_devices = numDevices;
|
most_devices = numDevices;
|
||||||
|
if (numDevices) {
|
||||||
|
unsigned int j;
|
||||||
|
char pbuff[256];
|
||||||
|
cl_device_id *devices = (cl_device_id *)malloc(numDevices*sizeof(cl_device_id));
|
||||||
|
|
||||||
|
clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, numDevices, devices, NULL);
|
||||||
|
for (j = 0; j < numDevices; j++) {
|
||||||
|
clGetDeviceInfo(devices[j], CL_DEVICE_NAME, sizeof(pbuff), pbuff, NULL);
|
||||||
|
applog(LOG_INFO, "\t%i\t%s", j, pbuff);
|
||||||
|
}
|
||||||
|
free(devices);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return most_devices;
|
return most_devices;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user