Merge pull request #5080 from dhiltgen/debug_intel_crash

Add some more debugging logs for intel discovery
This commit is contained in:
Daniel Hiltgen 2024-06-16 14:42:41 -07:00 committed by GitHub
commit 4c2c8f93dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;