#[non_exhaustive]pub enum ModelCheck {
Show 20 variants
ModelId,
ParamIds,
StatLabels,
ActionIds,
Palette,
Metadata,
DefaultSetup,
DefaultsFit,
ApplyModes,
Views,
ParallelJobs,
Actions,
StatCount,
ThreadCount,
SameSeed,
SeedSensitivity,
SamplingCadence,
BaselineBuild,
FullSubmission,
SampledSlice,
}testing only.Expand description
One contract of a model entry that the kit checks.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ModelId
The id meets the grammar of model ids.
ParamIds
Parameter ids are unique, and none repeats an id the engine prepends. Each is used on the command line and in
a design table, so it is not empty, holds no whitespace and no =, and does not start with action..
StatLabels
Stat labels are unique.
ActionIds
Action ids are unique. Each is used on the command line and in a design table, so it is not empty, and holds
no whitespace and no =.
Palette
A declared palette has colours.
Metadata
The backend, the structure, the topology hint and the device demand agree.
DefaultSetup
The declared defaults pass henad_compute::simulation::RunSetup::from_parts, as the app’s Build checks them.
DefaultsFit
A GPU model’s declared defaults fit wgpu::Limits::default(), the WebGPU baseline a browser offers.
ApplyModes
Each declared apply mode matches what set_param accepts.
Views
The factory returns the declared backend, and its views or GPU layers match the topology hint.
ParallelJobs
Only a CPU model reports parallel_jobs, and never zero jobs.
Actions
Every declared action is accepted, and the index after the last action is rejected.
StatCount
Every declared stat gets a value. A model that returns more values than it declares passes, since the engine drops the extra values before the check sees them.
ThreadCount
A CPU model’s stats and exported state are the same at the low and the high thread count.
SameSeed
Two builds on one seed agree.
SeedSensitivity
Two seeds differ in some stat.
SamplingCadence
A run sampled every tick ends where a run sampled every seventh tick ends.
BaselineBuild
The model builds on the device at its declared defaults, and its declared demand fits the device.
FullSubmission
One submission of MAX_STEPS_PER_SUBMISSION steps executes every step. A model that replays exactly reads back
the same stats as single steps, and any other model that declares stats reads back some stat that is not zero.
SampledSlice
A sampled slice reads back the same stats as a snapshot.
Implementations§
Source§impl ModelCheck
impl ModelCheck
Sourcepub const ALL: &'static [Self]
pub const ALL: &'static [Self]
Every check, in the order check_model runs them.
Trait Implementations§
Source§impl Clone for ModelCheck
impl Clone for ModelCheck
impl Copy for ModelCheck
Source§impl Debug for ModelCheck
impl Debug for ModelCheck
Source§impl Display for ModelCheck
impl Display for ModelCheck
impl Eq for ModelCheck
Source§impl Hash for ModelCheck
impl Hash for ModelCheck
Source§impl PartialEq for ModelCheck
impl PartialEq for ModelCheck
impl StructuralPartialEq for ModelCheck
Auto Trait Implementations§
impl Freeze for ModelCheck
impl RefUnwindSafe for ModelCheck
impl Send for ModelCheck
impl Sync for ModelCheck
impl Unpin for ModelCheck
impl UnsafeUnpin for ModelCheck
impl UnwindSafe for ModelCheck
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more