Skip to content

[SYCL] Add UR error code when throwing exception from Scheduler::enqueueCommandForCG #18517

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

Open
wants to merge 1 commit into
base: sycl
Choose a base branch
from

Conversation

martygrant
Copy link
Contributor

Add UR error code when throwing exception from Scheduler::enqueueCommandForCG.
Remove message string from non adapter specific error exception in checkUrResult as it's only used in the adapter specific error path.

This is related to oneapi-src/unified-runtime#2440 and #18423 where clEnqueueMemFillINTEL was failing with -30 (CL_INVALID_VALUE) but no detail was provided in the log:

terminate called after throwing an instance of 'sycl::_V1::exception'
  what():  Enqueue process failed.
Aborted (core dumped)

This is because the first exception thrown from checkUrResult was being hidden by a second exception thrown from Scheduler::enqueueCommandForCG. I've modified this second exception to include the UR result. The output now looks like:

terminate called after throwing an instance of 'sycl::_V1::exception'
  what():  Enqueue process failed.
Native API failed. Native API returns: 4 (UR_RESULT_ERROR_INVALID_VALUE)

…andForCG.

Remove message string from non adapter specific error exception in checkUrResult as it's only used in the adapter specific error path.
@martygrant martygrant changed the title Add UR error code when throwing exception from Scheduler::enqueueCommandForCG [SYCL] Add UR error code when throwing exception from Scheduler::enqueueCommandForCG May 19, 2025
@martygrant martygrant marked this pull request as ready for review May 19, 2025 12:49
@martygrant martygrant requested a review from a team as a code owner May 19, 2025 12:49
@martygrant martygrant requested a review from maarquitos14 May 19, 2025 12:49
Copy link
Contributor

@maarquitos14 maarquitos14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

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.

2 participants