Skip to content

[SYCL][UR] Include backend name in exception messages #18889

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2025

Conversation

kbenzie
Copy link
Contributor

@kbenzie kbenzie commented Jun 10, 2025

To aid with more accurate identification of the source of an error in the event of a thrown exception, include the backend name in error messages resulting from calls to Unified Runtime entry points. Here's an example of the output.

Before:

==== DeviceSanitizer: ASAN
terminate called after throwing an instance of 'sycl::_V1::exception'
 what(): UR backend failed. UR backend returns:40 (UR_RESULT_ERROR_OUT_OF_RESOURCES)

After:

==== DeviceSanitizer: ASAN
terminate called after throwing an instance of 'sycl::_V1::exception'
 what(): level_zero backend failed with error: 40 (UR_RESULT_ERROR_OUT_OF_RESOURCES)

@kbenzie kbenzie requested review from a team as code owners June 10, 2025 12:44
@kbenzie kbenzie requested a review from sergey-semenov June 10, 2025 12:44
@kbenzie kbenzie force-pushed the benie/ur-exception-backend-name branch from 30a351e to 9a84973 Compare June 10, 2025 12:46
@kbenzie kbenzie temporarily deployed to WindowsCILock June 10, 2025 12:46 — with GitHub Actions Inactive
@kbenzie kbenzie temporarily deployed to WindowsCILock June 10, 2025 13:14 — with GitHub Actions Inactive
To aid with more accurate identification of the source of an error in
the event of a thrown exception, include the backend name in error
messages resulting from calls to Unified Runtime entry points. Here's an
example of the output.

Before:

```
==== DeviceSanitizer: ASAN
terminate called after throwing an instance of 'sycl::_V1::exception'
 what(): UR backend failed. UR backend returns:40 (UR_RESULT_ERROR_OUT_OF_RESOURCES)
```

After:

```
==== DeviceSanitizer: ASAN
terminate called after throwing an instance of 'sycl::_V1::exception'
 what(): level_zero backend failed with error: 40 (UR_RESULT_ERROR_OUT_OF_RESOURCES)
```
@kbenzie kbenzie force-pushed the benie/ur-exception-backend-name branch from 9a84973 to 371365c Compare June 10, 2025 14:23
@kbenzie kbenzie temporarily deployed to WindowsCILock June 10, 2025 14:23 — with GitHub Actions Inactive
@kbenzie kbenzie temporarily deployed to WindowsCILock June 10, 2025 14:55 — with GitHub Actions Inactive
@kbenzie kbenzie temporarily deployed to WindowsCILock June 10, 2025 14:55 — with GitHub Actions Inactive
@kbenzie kbenzie merged commit 906f598 into intel:sycl Jun 11, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants