-
Notifications
You must be signed in to change notification settings - Fork 4
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] Add explicit update API to graph spec #77
Conversation
- Add an explicit update API to the graph specification.
Since the individual update function is only applicable to buffers and USM allocations, rename it `update_memory_parameter()` and elaborate on why it isn't possible to update scalar parameters.
Exceptions: | ||
|
||
* Throws synchronously with error code `invalid` if `from` is not found within the graph | ||
or if `to` is not compatible with `from`. |
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.
Do we need to specify what incompatible entails here? I feel like this statement is very generic.
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. |
Closing in favour of #340 |
Based on feedback from the specification PR. Originally we had argued for a more detailed API where the user would get information about parameters and then set them on the graph. This is similar to how things are done in CUDA but when actually developing the API in that direction it became clear there were numerous issues:
syclMemObjT
which carries no information other than the size of the buffer. CUDA deals purely in pointers so this is less of an issue.The original suggestion on the specification PR is seen in this PR as it avoids the user having to book keep (other than to keep the original parameters around).
I don't believe supporting updating scalar parameters captured by SYCL kernels is possible here though. Since ultimately the type information is lost and we will almost certainly need to take a copy of the scalar data in the implementation in future we would have no basis for comparison. However, since these parameters are considered to be captured by value in command group scope and are not a formal concept in SYCL, I don't believe this is an issue.
I've marked this PR as a draft for now to facilitate discussion about the approach taken.