-
Notifications
You must be signed in to change notification settings - Fork 68
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
Add clarification to event wait wording #520
Add clarification to event wait wording #520
Conversation
Look good to me! I don't especially like the addition of |
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.
I would prefer the wording wait_or_throw()
. :-)
Waiting for changes according to comment #520 (comment) |
What surprises me is that Options 1, 2, and 3 all look problematic to me, because they assume that async exceptions can be traced on the level of granularity of individual commands. One of the consequences of an asynchronous API (which, in some cases, is also allowed to reorder commands) is that that level of tracing is not possible. This doesn't have to be a bad thing. I'd argue that the minimum sensible level of granularity of async exception tracing is the queue. So I'll suggest two more possible solutions:
|
@etomzak I have responded to this comment in reply to the discussion above. |
Thanks, I agree, this was the original intent so it was implied, but it was raised by users that this was ambiguous so we thought we should clarify the wording to make sure it's clear. |
Still waiting on @AerialMantis to update. |
I have updated this PR to reflect the clarifications we discussed (3df6485). |
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.
The new wording looks good to me, but there is an error with the cross reference which causes CI to fail.
Summarizing a long WG discussion:
|
* Modify the wording of event::wait() and event::wait_and_throw() to clarify that they will throw asynchrous errors for this event and all dependent events to their respective async handlers. * Modify the wording around the waiting behave to match that which is used in the ISO C++ specification. * Modify the wording of the static event::wait() and event::wait_and_throw() functions to be based on the definitions in member functions to avoid duplication of wording.
* Clarified that `event::wait_and_throw` will pass to an async handler all unhandled asynchronous errors which are held by a queue or context associated with the event and dependent events. * Added a note that this behaviour is equivalent to calling `queue::throw_asynchornous` on each event. * Clarified that the async handler that is used to process the asynchornous errors is determined acording to the async handler priorities specified in section 4.13.1.3.
Co-authored-by: Greg Lueck <gregory.m.lueck@intel.com>
Tweak the wording of event::wait_and_throw() to allow an implementation to throw asynchornous errors unrelated to the queue/context used to enqueue the commands for which the event is waiting on.
c1d6809
to
7a7dde7
Compare
I've updated the wording to address the feedback from the recent WG discussion, |
…t-wording Add clarification to event wait wording
…t-wording Add clarification to event wait wording (cherry picked from commit 299d238)
…t-wording Add clarification to event wait wording (cherry picked from commit 299d238)
Motivation
It was discovered that the current wording for
event::wait_and_throw
was ambiguous.Table 34
The above wording suggests that only errors produced by commands associated with this event are waiting on are passed to the async handler, however, the use of the phrase "any context that the event was waiting on executions from" suggests that the intention was to pass errors produced by commands of this event and any dependent events.
Summary
In this patch, I have modified the wording of the
event::wait_and_throw()
member functions to clarify that they will throw asynchronous errors for this event and all dependent events to their respective async handlers.While changing this I have also modified the wording around the waiting behavior for both the
event::wait
andevent::wait_and_throw
member functions to match that which is used in the ISO C++ specification; to state that the function blocks until all commands have been completed. This wording could be extended to also include a synchronization clause, however, since these functions are still using the original format, I've just kept this to the effects clause for now.Finally, I have modified the wording of the static
event::wait()
andevent::wait_and_throw()
functions to be based on the definitions in member functions to avoid duplication of wording.Target
This patch is targeting SYCL 2020 as a clarification.