-
Notifications
You must be signed in to change notification settings - Fork 738
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
Conversation
"Platform create with native handle command not supported by backend."); | ||
} else { | ||
Plugin->checkPiResult(Result); | ||
} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
f1689f3
to
1701ed6
Compare
…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.
1701ed6
to
649e8d9
Compare
…tion isn't thrown.
649e8d9
to
c9c70e2
Compare
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. |
This pull request was closed because it has been stalled for 30 days with no activity. |
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 receivingUR_RESULT_ERROR_UNSUPPORTED_FEATURE
and will throw a SYCL exception with error codesycl::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 codesycl::errc::feature_not_supported
to ensure we are handling unsupported features from UR in intel-llvm appropriately.