Add some more debugging logs for intel discovery
Also removes an unused overall count variable
This commit is contained in:
parent
89c79bec8c
commit
fd1e6e0590
1 changed files with 5 additions and 3 deletions
|
@ -13,7 +13,7 @@ void oneapi_init(char *oneapi_lib_path, oneapi_init_resp_t *resp) {
|
||||||
resp->oh.num_drivers = 0;
|
resp->oh.num_drivers = 0;
|
||||||
const int buflen = 256;
|
const int buflen = 256;
|
||||||
char buf[buflen + 1];
|
char buf[buflen + 1];
|
||||||
int i, d, count;
|
int i, d;
|
||||||
struct lookup {
|
struct lookup {
|
||||||
char *s;
|
char *s;
|
||||||
void **p;
|
void **p;
|
||||||
|
@ -62,6 +62,8 @@ void oneapi_init(char *oneapi_lib_path, oneapi_init_resp_t *resp) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOG(resp->oh.verbose, "calling zesInit\n");
|
||||||
|
|
||||||
ret = (*resp->oh.zesInit)(0);
|
ret = (*resp->oh.zesInit)(0);
|
||||||
if (ret != ZE_RESULT_SUCCESS) {
|
if (ret != ZE_RESULT_SUCCESS) {
|
||||||
LOG(resp->oh.verbose, "zesInit err: %x\n", ret);
|
LOG(resp->oh.verbose, "zesInit err: %x\n", ret);
|
||||||
|
@ -71,7 +73,7 @@ void oneapi_init(char *oneapi_lib_path, oneapi_init_resp_t *resp) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
count = 0;
|
LOG(resp->oh.verbose, "calling zesDriverGet\n");
|
||||||
ret = (*resp->oh.zesDriverGet)(&resp->oh.num_drivers, NULL);
|
ret = (*resp->oh.zesDriverGet)(&resp->oh.num_drivers, NULL);
|
||||||
if (ret != ZE_RESULT_SUCCESS) {
|
if (ret != ZE_RESULT_SUCCESS) {
|
||||||
LOG(resp->oh.verbose, "zesDriverGet err: %x\n", ret);
|
LOG(resp->oh.verbose, "zesDriverGet err: %x\n", ret);
|
||||||
|
@ -96,6 +98,7 @@ void oneapi_init(char *oneapi_lib_path, oneapi_init_resp_t *resp) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (d = 0; d < resp->oh.num_drivers; d++) {
|
for (d = 0; d < resp->oh.num_drivers; d++) {
|
||||||
|
LOG(resp->oh.verbose, "calling zesDeviceGet %d\n", resp->oh.drivers[d]);
|
||||||
ret = (*resp->oh.zesDeviceGet)(resp->oh.drivers[d],
|
ret = (*resp->oh.zesDeviceGet)(resp->oh.drivers[d],
|
||||||
&resp->oh.num_devices[d], NULL);
|
&resp->oh.num_devices[d], NULL);
|
||||||
if (ret != ZE_RESULT_SUCCESS) {
|
if (ret != ZE_RESULT_SUCCESS) {
|
||||||
|
@ -116,7 +119,6 @@ void oneapi_init(char *oneapi_lib_path, oneapi_init_resp_t *resp) {
|
||||||
oneapi_release(resp->oh);
|
oneapi_release(resp->oh);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
count += resp->oh.num_devices[d];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue