-
Notifications
You must be signed in to change notification settings - Fork 123
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
[L0] Add support for in-order lists using L0 driver #1372
Conversation
7ecbcf2
to
319ad3f
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1372 +/- ##
==========================================
- Coverage 14.82% 12.49% -2.33%
==========================================
Files 250 239 -11
Lines 36220 35993 -227
Branches 4094 4081 -13
==========================================
- Hits 5369 4498 -871
- Misses 30800 31491 +691
+ Partials 51 4 -47 ☔ View full report in Codecov by Sentry. |
9e1175b
to
4edad79
Compare
LLVM Draft at intel/llvm#12833 |
9b3bf62
to
3cadc0e
Compare
3cadc0e
to
7d80559
Compare
@@ -191,9 +191,28 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueKernelLaunch( | |||
ZE2UR_CALL(zeKernelSetGroupSize, (ZeKernel, WG[0], WG[1], WG[2])); | |||
|
|||
bool UseCopyEngine = false; | |||
|
|||
bool UseTmpWaitList = false; | |||
if (Queue->Device->useDriverInOrderLists() && Queue->isInOrderQueue()) { |
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.
consider combining into single helper function
27829e7
to
3bf50fa
Compare
862364b
to
8065e36
Compare
1f1f181
to
ad529c3
Compare
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.
LGTM approved
a6269c7
to
cb924a7
Compare
@nrspruit : I've rebased both this PR and the LLVM PR, and both are fully passing all CI tests. We are good to go now. @kbenzie : This is ready for merging, please proceed with merging process as soon as possible as this one is for a priority deliverable. Thank you. LLVM PR that references this commit: intel/llvm#12833 |
source/adapters/level_zero/queue.cpp
Outdated
// Evaluate performance of explicit usage for "0" index. | ||
if (QueueIndex != 0) { | ||
if (Queue->Device->useDriverInOrderLists() && Queue->isInOrderQueue()) { | ||
ZeCommandQueueDesc.flags = ZE_COMMAND_QUEUE_FLAG_IN_ORDER; |
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.
just out of curiosity: is the flag ZE_COMMAND_QUEUE_FLAG_IN_ORDER
mutually exclusive with ZE_COMMAND_QUEUE_FLAG_EXPLICIT_ONLY
?
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.
it is not mutually exclusive, ZE_COMMAND_QUEUE_FLAG_EXPLICIT_ONLY doesn't do anything in today's driver
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 asked because this code seems to suggest that, picking one flag or the other depending on (seemingly independent) conditions.
So, ignoring the fact that ZE_COMMAND_QUEUE_FLAG_EXPLICIT_ONLY
is a noop (assuming a future driver might take advantage of the flag to do something), should this code look more like this:
if (QueueIndex != 0) {
ZeCommandQueueDesc.flags |= ZE_COMMAND_QUEUE_FLAG_EXPLICIT_ONLY;
}
if (Queue->Device->useDriverInOrderLists() && Queue->isInOrderQueue()) {
ZeCommandQueueDesc.flags |= ZE_COMMAND_QUEUE_FLAG_IN_ORDER;
}
?
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.
Good suggestion, thanks @pbalcer. Yes if it's not mutually exclusive, we could set it in the way you suggested. I can make an update for that.
Update: Made the change in PR to set flags in that way.
3b020f2
to
9d1372d
Compare
Please pull in the main branch to have up to date testing, also update the tag in the intel/llvm PR. |
Signed-off-by: Raiyan Latif <raiyan.latif@intel.com>
Have URT utilize L0 driver native implementation as opposed to L0 URT adapter implementation to ensure in-order semantics when creating inOrderQueues.
Verified working with SYCL e2e in-order queue related tests locally, both with adapter implementation and L0 driver native implementation. One sample that tested it well:
LLVM Draft with all CI / SYCL e2e for this commit passing at: intel/llvm#12833