-
Notifications
You must be signed in to change notification settings - Fork 790
[SYCL][UR][L0 v2] Add a note about make_queue support #19644
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 found this quite hard to read. Something like the below might be clearer:
I think you also need to specify what happens if somebody passes a
ze_command_queue_handle_tto this function and the V2 adapter is not used. Is it undefined behavior, will the program crash, will we throw an exception...?More generally... The description of this function's behavior is now really long, with reference to different specification versions and different adapter versions. I think it's too confusing and would benefit from a rewrite, but that might be out of scope for this PR.
@gmlueck - This might be an interesting case to consider in the context of KhronosGroup/SYCL-Docs#777. If the Level Zero backend didn't have to jump through hoops to satisfy the
backend_input_tinterface, we would be free to define separate overloads like:I think this would make it much easier to describe what these functions actually do, which would also make it easier for developers to understand and use them.
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 think we should throw an exception, so applications know they did something that is not supported.
Uh oh!
There was an error while loading. Please reload this page.
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, I applied your suggestion @Pennycook. Right now, the behavior is that when
ze_command_queue_handle_tis passed we will throw an exception (UR returns UR_RESULT_ERROR_UNSUPPORTED_FEATURE). However, when the command list is notin-orderwe might crash. Unfortunately, there is currently no API to check whether a command list is in-order or not. Once this API is added we can also throw an exception in that case.Should we document this behavior as is right now?
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.
Yes, I think it would be valuable to capture what the current state is, and to update it later.
If you say that passing an out-of-order command list is undefined behavior, that will cover the current state (crash) and the desired future state (exception). Once we can be sure that we always throw an exception, we can tighten the specification to say that's required.
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.
Done.