You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SYCL] Add device_type to SYCL_PI_TRACE and device_selector exception (#6896)
Device selector exception message and SYCL_PI_TRACE are extended with
device type info for better debuggability in case of missed device in
application that works with multiple devices.
Current exception message:
```
No device of requested type available. -1 (PI_ERROR_DEVICE_NOT_FOUND) # in case of any device selector
```
Example of the current output from SYCL_PI_TRACE:
```
SYCL_PI_TRACE[all]: Selected device: -> final score = 1000
SYCL_PI_TRACE[all]: platform: Intel(R) OpenCL
SYCL_PI_TRACE[all]: device: Intel(R) Xeon(R) Gold 6354 CPU @ 3.00GHz
```
New exception message:
```
No device of requested type available. -1 (PI_ERROR_DEVICE_NOT_FOUND) # in case of custom/default selector
No device of requested type 'info::device_type::gpu' available. -1 (PI_ERROR_DEVICE_NOT_FOUND) # in case of gpu selector
No device of requested type 'info::device_type::cpu' available. -1 (PI_ERROR_DEVICE_NOT_FOUND) # in case of cpu selector
No device of requested type 'info::device_type::accelerator' available. -1 (PI_ERROR_DEVICE_NOT_FOUND) # in case of accelerator selector
```
Example of SYCL_PI_TRACE output with extra line about requested
device_type:
```
SYCL_PI_TRACE[all]: Requested device_type: info::device_type::cpu
SYCL_PI_TRACE[all]: Selected device: -> final score = 1000
SYCL_PI_TRACE[all]: platform: Intel(R) OpenCL
SYCL_PI_TRACE[all]: device: Intel(R) Xeon(R) Gold 6354 CPU @ 3.00GHz
```
0 commit comments