Read the made conversion's refresh; the sample-and-gather test reads the note's clauses

m3-max-8228: the conversion's record still named self.refresh. An artifact
lists a specialized note among its precision notes too, so the test checks
that every clause of the model's note tests the bound sampler word.

(cherry picked from commit 6ceb3a2d3ecc76bca49d83bac92d11eb072b31ed)
This commit is contained in:
Anees Iqbal committed 2026-11-08 06:29:48 -08:00
1 parent dfdbca7d72
commit ed618c7102
2 files changed
+24 -4

No files matched your search

+1 -1
View File
@@ -954,7 +954,7 @@ impl YCbCrConversion {
let state_at = made.shape_at + STATE_AT;
let completed_at = made.shape_at + COMPLETED_AT;
let word = |w: u32| w.to_le_bytes();
let refresh = self
let refresh = made
.refresh
.as_ref()
.filter(|refresh| refresh.planes == source);
@@ -1292,9 +1292,29 @@ fn a_slot_that_samples_and_gathers_reads_its_planes_in_place() {
};
assert!(!notes(&a).contains(&other), "{what}: {:?}", notes(&a));
// The model's note holds only under the bound format and word, never outright.
assert!(!a.precision.contains(&filter), "{what}: {:?}", a.precision);
let noted = a.specialized.iter().any(|s| s.note == filter);
assert_eq!(noted, policy == "model", "{what}: {:?}", a.specialized);
let clauses: Vec<_> = a
.specialized
.iter()
.filter(|s| s.note == filter)
.flat_map(|s| &s.when)
.collect();
let word = |c: &&crate::pipeline::artifact::SpecClause| {
c.all
.iter()
.any(|t| matches!(t.key, SpecKey::BoundSamplerWord(_)))
};
assert_eq!(
!clauses.is_empty() && clauses.iter().all(word),
policy == "model",
"{what}: {:?}",
a.specialized
);
assert_eq!(
notes(&a).contains(&filter),
policy == "model",
"{what}: {:?}",
notes(&a)
);
}
}
}