Skip to content

Conversation

@EuphoricThinking
Copy link
Contributor

No description provided.

@EuphoricThinking EuphoricThinking marked this pull request as ready for review December 28, 2025 15:38
@EuphoricThinking EuphoricThinking requested a review from a team as a code owner December 28, 2025 15:38
Copy link
Contributor

@pbalcer pbalcer left a 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 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
Copy link
Contributor

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.
Copy link
Contributor

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.

Copy link
Contributor Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants