grouped_submissions: print the handler test's counts at each step
What. a_held_group_goes_before_another_queue_s_submission_handler_runs's record now holds the kernel submissions made, groups kept and batches grouped since A's commit, read once A was taken in, B scheduled and X scheduled, and its printed line names them. Why. On the RX 7900 XTX (RADV) the test found the queues sharing one VkQueue and the driver merging, yet X was not kept behind A and B (kept 0), where the lane's behind_running_work keeps its second command buffer there. Which step sent X decides whether the test or the runtime is wrong; the line said only the end. Verified: cargo fmt. The XTX run is a potluck job. (cherry picked from commit 9da06ab3a435d48d4e1991af32e6b62c9f99e399) (cherry picked from commit c4efae0678220c8cb886ba3622eff89d6d1416b9)
This commit is contained in:
1 parent
bacd33bec5
commit
ce9922ec8e
1 file changed
+19
-2
@@ -1140,6 +1140,9 @@ struct HandlerWait {
|
||||
waited: std::time::Duration,
|
||||
/// The groups by what sent them, from `Y`'s commit on ([`group_ends`]).
|
||||
ends: [u64; 7],
|
||||
/// The kernel submissions made, groups kept and batches grouped since `A`'s commit, once
|
||||
/// `A` was taken in, `B` scheduled and `X` scheduled.
|
||||
steps: [(u64, u64, u64); 3],
|
||||
}
|
||||
|
||||
/// The module docs' run with a handler that waits for another queue's command buffer, `A` of
|
||||
@@ -1179,12 +1182,23 @@ fn behind_another_queue_s_handler(stretch: usize) -> HandlerWait {
|
||||
blit.fill_buffer(&large, 0..RUNNING_FILL, at as u8).unwrap();
|
||||
}
|
||||
blit.end_encoding().unwrap();
|
||||
let before_a = device.work_counts();
|
||||
let step = || {
|
||||
let counts = device.work_counts();
|
||||
(
|
||||
counts.queue_submissions - before_a.queue_submissions,
|
||||
counts.groups_kept_pending - before_a.groups_kept_pending,
|
||||
counts.batches_grouped - before_a.batches_grouped,
|
||||
)
|
||||
};
|
||||
running.commit().unwrap();
|
||||
taken_in(&device);
|
||||
let a_taken = step();
|
||||
let behind = fill(&first, 0);
|
||||
behind.commit().unwrap();
|
||||
taken_in(&device);
|
||||
behind.wait_until_scheduled().unwrap();
|
||||
let b_scheduled = step();
|
||||
// `X`, held behind `A` and `B` where the driver merges.
|
||||
let before_x = device.work_counts();
|
||||
let x = fill(&first, 1);
|
||||
@@ -1197,6 +1211,7 @@ fn behind_another_queue_s_handler(stretch: usize) -> HandlerWait {
|
||||
taken_in(&device);
|
||||
x.wait_until_scheduled().unwrap();
|
||||
let kept = device.work_counts().groups_kept_pending - before_x.groups_kept_pending;
|
||||
let steps = [a_taken, b_scheduled, step()];
|
||||
// `Y`, whose submission handler waits for `X`'s completed handler.
|
||||
let before_y = device.work_counts();
|
||||
let y = fill(&second, 2);
|
||||
@@ -1238,13 +1253,15 @@ fn behind_another_queue_s_handler(stretch: usize) -> HandlerWait {
|
||||
reached,
|
||||
waited,
|
||||
ends: group_ends(&before_y, &device.work_counts()),
|
||||
steps,
|
||||
}
|
||||
};
|
||||
layer_reported_nothing_at_all(&messages);
|
||||
eprintln!(
|
||||
"GROUPED-HANDLER-WAIT on {}: Y's handler waited {:?}; groups from Y's commit by what \
|
||||
sent them {:?}; {seen:?}",
|
||||
seen.device, seen.waited, seen.ends
|
||||
sent them {:?}; submissions, groups kept and batches grouped once A was taken in, B \
|
||||
and X scheduled {:?}; {seen:?}",
|
||||
seen.device, seen.waited, seen.ends, seen.steps
|
||||
);
|
||||
seen
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user