testing only.Expand description
Checks of a model entry’s contracts, for a model’s own tests.
check_model runs every ModelCheck that applies to an entry and returns a ModelReport of the failures
and the skipped checks. assert_set_conforms checks a whole ModelSet and panics with every failure. A
check never panics on a model’s behalf. A model’s panic, a device error and a broken contract each come back as a
CheckFailure.
Each check that builds the model sets grid_width, grid_height, num_agents, world_width and
world_height small, within their bounds and never above their defaults. ModelCheck::ThreadCount sets the
size the work splits at, and the GPU checks and a GPU model’s ModelCheck::Actions build at the declared
defaults. CheckSettings::set_text overrides any of these.
A GPU model is built on the device passed to CheckSettings::gpu. Without a device, or on wasm32, every check
that builds it is skipped, apart from the failures check_model lists. The GPU checks and
headless_test_device are native only.
Note that a caller of check_model or check_model_set installs the panic hook first, through
henad_compute::fault::install_panic_hook. Without it the failure of a kernel panic has no file:line.
Structs§
- Check
Failure - One check that failed, with what it found.
- Check
Settings - Device, run length, thread counts, parameter overrides and exemptions of a check run.
- Model
Report - Failures and skipped checks of one model.
- SetReport
- Reports of every model of a set, and the model ids that the settings specify and that are missing from the set.
- Skipped
Check - One check that did not run, with the reason.
- Test
Device Request - Limits and features to request for a test device.
Enums§
- Model
Check - One contract of a model entry that the kit checks.
- Skip
Reason - Reason a check did not run.
Constants§
- MIN_
TICKS - Minimum number of ticks that
CheckSettings::ticksaccepts, one past the coarser sampling cadence.
Functions§
- assert_
set_ conforms - Installs the panic hook, then checks every model of
models. - check_
model - Checks every contract of
entrythatsettingsallows, and reports every failure. - check_
model_ set - Checks every model of
models, in the set’s order. - headless_
test_ device Non-WebAssembly - Returns a headless device for
request, orNoneon a machine without a device.