-
Notifications
You must be signed in to change notification settings - Fork 715
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][DOC] Propose "get_kernel_info" extension #14472
base: sycl
Are you sure you want to change the base?
Conversation
Add a proposed extension to query a kernel's information descriptor without creating a kernel bundle.
Also improve the wording for constraints.
don't think we want to mandate an error check at runtime. | ||
In retrospect, I think this is the right behavior for the core SYCL spec also, | ||
and we should consider changing the specified behavior. | ||
Thoughts? |
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.
Which exceptions are these, specifically?
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.
For example:
Preconditions: [...] The device
dev
must be one of the devices contained byctxt
. The kernelKernelName
must be compatible with the devicedev
as defined byis_compatible
.
In the existing SYCL 2020 spec, these error conditions mandate an exception:
An
exception
with theerrc::invalid
error code if any of the devices indevs
is not one of devices contained by the contextctxt
or is not a descendent device of some device inctxt
.An
exception
with theerrc::invalid
error code if the kernel is not compatible with devicedev
(as defined byis_compatible()
)
However, this seems different from a _Constraint_, which is expected to result | ||
in a compile-time error. | ||
For now, I just listed it as a _Precondition_, so there is no formal | ||
requirement for an implementation to diagnose this error. |
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.
Seems like the specification currently uses precondition
for template argument requirements, so I think precondition is fine.
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.
Seems like the specification currently uses
precondition
for template argument requirements
In the current SYCL 2020 specification, you mean? Yes, this is a bug in the specification, and it's my fault. I wrote that part of the specification before I understood the difference between Preconditions and Constraints. Those should be Constraints. It's on my list of things to clean up.
In the calls to `get_kernel_info` allow the device to be a descendent device of the provided context.
Add a proposed extension to query a kernel's information descriptor without creating a kernel bundle.