-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL] Implement queue::ext_oneapi_empty() API to get queue status #7583
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 all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
0035ffd
[SYCL] Implement queue::ext_oneapi_empty() API to get queue status
againull cfe66d9
Add piQueueGetInfo parameter to query queue status
againull 92e5286
[SYCL] Add implementation for CUDA and HIP
againull 7883ffe
Support for out-of-order queues except OpenCL
againull da0de48
Execute open command lists before querying queue status
againull 50977e4
Merge remote-tracking branch 'origin/sycl' into ext_oneapi_empty
againull 133df85
Address review comments
againull 1069bad
Fix ABI test files
againull 6dc2c24
Address review comments
againull 2f39b72
Take care of immediate command lists
againull 565ba4d
Throw an error from opencl plugin instead of SYCL RT
againull e9b0355
Handle in-order and discarded queues in the L0 plugin
againull fa4b120
Update pi_opencl symbols
againull fc838d1
Fix mistake
againull b41149c
Address review comments
againull 04d5549
Merge remote-tracking branch 'origin/sycl' into ext_oneapi_empty
againull 54e624c
Add comment in OpenCL plugin
againull 18f40f7
Update PI version
againull 706b19e
Address review comments in CUDA/HIP plugins
againull 93155e5
Merge remote-tracking branch 'origin/sycl' into ext_oneapi_empty
againull ebf7fe7
Move extension to supported, update the Status
againull 71ea2ba
Merge remote-tracking branch 'origin/sycl' into ext_oneapi_empty
againull bed1f70
Use C++17 CTAD everywhere
againull 8be6a14
Merge remote-tracking branch 'origin/sycl' into ext_oneapi_empty
againull 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -478,6 +478,28 @@ struct _pi_queue { | |
return is_last_command && !has_been_synchronized(stream_token); | ||
} | ||
|
||
template <typename T> bool all_of(T &&f) { | ||
{ | ||
std::lock_guard compute_guard(compute_stream_mutex_); | ||
unsigned int end = | ||
std::min(static_cast<unsigned int>(compute_streams_.size()), | ||
num_compute_streams_); | ||
if (!std::all_of(compute_streams_.begin(), compute_streams_.begin() + end, | ||
f)) | ||
return false; | ||
} | ||
{ | ||
std::lock_guard transfer_guard(transfer_stream_mutex_); | ||
unsigned int end = | ||
std::min(static_cast<unsigned int>(transfer_streams_.size()), | ||
num_transfer_streams_); | ||
if (!std::all_of(transfer_streams_.begin(), | ||
transfer_streams_.begin() + end, f)) | ||
return false; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We really need some heavy refactoring across the various back-ends some day... :-( |
||
return true; | ||
} | ||
|
||
template <typename T> void for_each_stream(T &&f) { | ||
{ | ||
std::lock_guard<std::mutex> compute_guard(compute_stream_mutex_); | ||
|
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.