Tests that make command queues on three or more threads at once take the queue plan
scheduler_wakes::commits_with_idle_gaps_lose_no_wake makes a command
queue on each of four threads, so three can be live at once; whether
they are depends on timing. The runtime tests' default queue limits
(two round-robin VkQueues) panic there. A lavapipe run of another lane
hit that panic, though this lane's 2740/2740 run at 06b5fe355e did not.
A scan of every spawned thread in the runtime's tests that makes a
command queue found two more of that class, both opt-in benchmarks
compiled only under m2v_gpu: host_ram_contended_fill_bench (CLIPS = 3
threads) and host_ram_block_release_bench (its first queue, the
compositor's and the releases' queue). The others keep at most two
live at once: command_counts, deferred_calls, freed_memory,
heap_set_unlocked, managed_copy_device, fill_waits_bench,
managed_copies_bench, memory_block_bench and memory_make_hold_bench.
They now take the plan (`queue_limits: None`). scheduler_wakes gains
plan_device over a device_of, as the other modules' helpers do.
This commit is contained in:
1 parent
56ae450542
commit
3db60efc33
2 files changed
+26
-3
No files matched your search
@@ -504,6 +504,9 @@ fn host_ram_contended_fill_bench() {
|
||||
DeviceKind::Integrated,
|
||||
DeviceKind::Virtual,
|
||||
],
|
||||
// Its [`CLIPS`] threads each keep a command queue live at once: the queue plan, not the
|
||||
// runtime tests' default queue limits (`device/create.rs`).
|
||||
queue_limits: None,
|
||||
..DeviceOptions::default()
|
||||
};
|
||||
let device = Device::system_default_with(&options).unwrap();
|
||||
@@ -694,6 +697,9 @@ fn host_ram_block_release_bench() {
|
||||
DeviceKind::Integrated,
|
||||
DeviceKind::Virtual,
|
||||
],
|
||||
// Its first queue, the compositor's and the releases' are live at once: the queue plan,
|
||||
// not the runtime tests' default queue limits (`device/create.rs`).
|
||||
queue_limits: None,
|
||||
..DeviceOptions::default()
|
||||
};
|
||||
let device = Device::system_default_with(&options).unwrap();
|
||||
|
||||
@@ -55,8 +55,25 @@ fn device() -> Device {
|
||||
|
||||
/// [`device`] of `policy`.
|
||||
fn device_with(policy: DevicePolicy) -> Device {
|
||||
let options = DeviceOptions {
|
||||
device_of(DeviceOptions {
|
||||
policy,
|
||||
..DeviceOptions::default()
|
||||
})
|
||||
}
|
||||
|
||||
/// As [`device`], with the queue plan (`queue_limits: None`) in place of the runtime tests'
|
||||
/// default queue limits (`device/create.rs`): for a test that keeps more than two of its
|
||||
/// command queues live at once.
|
||||
fn plan_device() -> Device {
|
||||
device_of(DeviceOptions {
|
||||
queue_limits: None,
|
||||
..DeviceOptions::default()
|
||||
})
|
||||
}
|
||||
|
||||
/// [`device`], its other options `base`'s.
|
||||
fn device_of(base: DeviceOptions) -> Device {
|
||||
let options = DeviceOptions {
|
||||
kinds: match cfg!(m2v_cpu_icd) {
|
||||
true => vec![DeviceKind::Cpu],
|
||||
false => vec![
|
||||
@@ -65,7 +82,7 @@ fn device_with(policy: DevicePolicy) -> Device {
|
||||
DeviceKind::Virtual,
|
||||
],
|
||||
},
|
||||
..DeviceOptions::default()
|
||||
..base
|
||||
};
|
||||
Device::system_default_with(&options).unwrap()
|
||||
}
|
||||
@@ -177,7 +194,7 @@ fn a_burst_of_commits_wakes_the_sleeping_thread_once() {
|
||||
/// most once a sleep.
|
||||
#[test]
|
||||
fn commits_with_idle_gaps_lose_no_wake() {
|
||||
let device = device();
|
||||
let device = plan_device();
|
||||
let before = device.work_counts();
|
||||
std::thread::scope(|scope| {
|
||||
for thread in 0..4u64 {
|
||||
|
||||
Reference in new issue
Block a user