Skip to content
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

[SYCL] Throw exception for unsupported UR features #12361

Closed
wants to merge 2 commits into from

Conversation

martygrant
Copy link
Contributor

Stemming from removing die calls in unsupported UR entry points (oneapi-src/unified-runtime#1127) and a spin-out issue discussing how to handle these errors in intel-llvm (oneapi-src/unified-runtime#1161).

This PR changes various PI entry points to interpret PI_ERROR_INVALID_OPERATION as receiving UR_RESULT_ERROR_UNSUPPORTED_FEATURE and will throw a SYCL exception with error code sycl::errc::feature_not_supported.

A new e2e test has been added (Plugin/ur_unsupported_feature.cpp) which is meant to purposely call an unsupported UR entry point and will assert that an exception is thrown specifically with code sycl::errc::feature_not_supported to ensure we are handling unsupported features from UR in intel-llvm appropriately.

"Platform create with native handle command not supported by backend.");
} else {
Plugin->checkPiResult(Result);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This pattern seems to repeat a lot. Could we maybe make a new call_optional or call_ext or something along those lines?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your suggestion, it certainly would be good to refactor out the repetitiveness here. I wonder if it might be worth putting the check inside the pre-existing call or call_nocheck functions?

…TION as receiving UR_RESULT_ERROR_UNSUPPORTED_FEATURE from Unified Runtime

and throw an appropriate exception. Added a new e2e test to check the error is handled correctly.
Copy link
Contributor

github-actions bot commented Oct 3, 2024

This pull request is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be automatically closed in 30 days.

@github-actions github-actions bot added the Stale label Oct 3, 2024
Copy link
Contributor

github-actions bot commented Nov 3, 2024

This pull request was closed because it has been stalled for 30 days with no activity.

@github-actions github-actions bot closed this Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants