You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's possible to use miri to run some tests (cpu ones - so no cuda feature - and the ones that don't interact with python - so no numpy feature). Miri can be particularly useful to detect possible Undefined Behavior cases and memory leaks, although it can also have false positives (and false negatives - this depends on the tests coverage).
Setup
The miri readme mentions using cargo nextest so tests are able to run in parallel, and for memory leaks to be detected.
# cargo clean (run once when `cargo miri` is not used)
cargo clean
# run all tests (note: very slow and should take hours, assuming there are no errors)
MIRIFLAGS='-Zmiri-strict-provenance -Zmiri-symbolic-alignment-check -Zmiri-retag-fields -Zmiri-disable-isolation -Zmiri-tree-borrows' \
cargo miri nextest run --test-threads 1 --no-default-features --features std,fast-alloc,cpu,nightly,safetensors
Note that miri is very slow and takes an hour to run eg. the longest transformer test. So an accompanying issue (#898) would be to reduce the test sizes to their minimum.
The text was updated successfully, but these errors were encountered:
Closing as I think the tests that got run on the linked pr indicated a robust behavior.
But feel free to ping or re-open in case anyone has an interest!
It's possible to use miri to run some tests (cpu ones - so no
cuda
feature - and the ones that don't interact with python - so nonumpy
feature). Miri can be particularly useful to detect possible Undefined Behavior cases and memory leaks, although it can also have false positives (and false negatives - this depends on the tests coverage).Setup
The miri readme mentions using cargo nextest so tests are able to run in parallel, and for memory leaks to be detected.
Note that miri is very slow and takes an hour to run eg. the longest transformer test. So an accompanying issue (#898) would be to reduce the test sizes to their minimum.
The text was updated successfully, but these errors were encountered: