-
Notifications
You must be signed in to change notification settings - Fork 808
[L0v2] add tests dedicated for batched queue submissions #20833
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
base: sycl
Are you sure you want to change the base?
Conversation
bc4d419 to
d635e4f
Compare
d635e4f to
08e7e92
Compare
pbalcer
left a comment
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, just a few minor nits.
| output.data(), 0, nullptr, nullptr)); | ||
| ASSERT_SUCCESS(urQueueFlush(queue1)); | ||
|
|
||
| // When trying to push another submitted batch to the vector of submitted batches after reaching its arbitrarily set capacity, the vector is cleared as a result of queueFinish. Submitted batches (regular command lists) are returned to the command list cache in their destructors. |
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.
| // When trying to push another submitted batch to the vector of submitted batches after reaching its arbitrarily set capacity, the vector is cleared as a result of queueFinish. Submitted batches (regular command lists) are returned to the command list cache in their destructors. | |
| // When trying to push another submitted batch to the vector of submitted batches after reaching its arbitrarily set capacity, the vector is cleared as a result of queueFlush. Submitted batches (regular command lists) are returned to the command list cache in their destructors. |
?
|
|
||
| UUR_INSTANTIATE_DEVICE_TEST_SUITE(urBatchedQueueTest); | ||
|
|
||
| void isEventSubmitted(ur_event_handle_t &event) { |
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.
| void isEventSubmitted(ur_event_handle_t &event) { | |
| void AssertEventIsSubmitted(ur_event_handle_t &event) { |
|
|
||
| TEST_P(urBatchedQueueTest, ReuseCommandLists) { | ||
| int iterNum = 3; | ||
| // Repetaed several times to ensure that command lists are reused when the initial capacity is reached multiple times |
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.
| // Repetaed several times to ensure that command lists are reused when the initial capacity is reached multiple times | |
| // Repeated several times to ensure that command lists are reused when the initial capacity is reached multiple times |
| for (int i = 0; i < iterNum; i++) { | ||
| ASSERT_NO_FATAL_FAILURE(vectorOfSubmittedBatchesIsClearedHelper()); | ||
| } | ||
| } No newline at end of file |
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.
missing newline
| ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue1, cmd_buf_handle, 0, nullptr, | ||
| &eventOnImmediate)); | ||
|
|
||
| // Operations enqueued on a regular command list must be submitted for execution before they are passed to the driver as events to wait on. Generation numbers assigned to events allow for determining whether the batch which includes an operation bound to the event has already been run: if the generation number of the event is lower than the generation number of the current batch, the batch assigned to the event has been submitted for execution. If the numbers are equal, the current batch should be submitted for execution - then, the operations enqueued on the current batch would be executed. Otherwise, the event would never be signalled. However, since command buffers are enqueued on immediate command lists, they are also submitted for execution immediately - in contrast to operations submitted on regular command lists: their execution would start only when a regular command list is enqueued directly on an immediate command list. Therefore, for events generated by submitting command buffers on batched queues, the generation number of the current batch is not tracked. |
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.
did this pass clang-format?:D please try to keep line length to 80, or max 100.
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 formatter formatted the code, not the comments (make cppformat)
08e7e92 to
7641309
Compare
7641309 to
b33230f
Compare
b33230f to
efa1752
Compare
No description provided.