Tests: unshared_isolation keys no profile; the expected run's halving rounds toward the longer
The unit test asked 10 ms where halving 20 ms toward 1 ns answers 10 ms and 1 ns (job m3-max-16503, the one failure of its 62 tests); the profile test is the one every runtime choice of DevicePolicy has.
This commit is contained in:
1 parent
9bad7ed6f7
commit
a61da20d1d
2 files changed
+24
-1
No files matched your search
@@ -36,7 +36,11 @@ fn a_longer_run_is_taken_at_once_and_a_shorter_one_halves_the_way() {
|
||||
expected.observed(10 * MS);
|
||||
assert_eq!(expected.nanos(), 20 * MS, "halfway to a shorter one");
|
||||
expected.observed(0);
|
||||
assert_eq!(expected.nanos(), 10 * MS, "a run of nothing counts as 1 ns");
|
||||
assert_eq!(
|
||||
expected.nanos(),
|
||||
10 * MS + 1,
|
||||
"a run of nothing counts as 1 ns, the half rounded toward the longer"
|
||||
);
|
||||
}
|
||||
|
||||
/// A queue whose batches ran 30 ms, then 1 ms: within five of the short ones, its next batch may
|
||||
|
||||
@@ -609,6 +609,25 @@ fn the_runtime_s_queue_sharing_choice_keys_no_profile() {
|
||||
}
|
||||
}
|
||||
|
||||
/// The runtime's choice of how much of other queues' work goes ahead of an unshared queue's
|
||||
/// (`unshared_isolation`) moves no committed profile's fingerprint: no profile carries it, so no
|
||||
/// translation follows it.
|
||||
#[test]
|
||||
fn the_runtime_s_unshared_isolation_choice_keys_no_profile() {
|
||||
use crate::spirv::testing::committed_profiles_with;
|
||||
let bounded = committed_profiles_with(DevicePolicy::UNTRUSTED).expect("profiles");
|
||||
let off = committed_profiles_with(DevicePolicy {
|
||||
unshared_isolation: UnsharedIsolationPolicy::Off,
|
||||
..DevicePolicy::UNTRUSTED
|
||||
})
|
||||
.expect("profiles");
|
||||
assert_eq!(bounded.len(), off.len());
|
||||
for ((stem, b), (other, o)) in bounded.iter().zip(&off) {
|
||||
assert_eq!(stem, other);
|
||||
assert_eq!(b.fingerprint(), o.fingerprint(), "{stem}");
|
||||
}
|
||||
}
|
||||
|
||||
/// `DevicePolicy::exact_answers()` keeps every command queue on the `VkQueue` it took at its
|
||||
/// creation, and the default shares them where the device's GPU idles between `VkQueue`s.
|
||||
#[test]
|
||||
|
||||
Reference in new issue
Block a user