-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Miri: non-deterministic floating point operations in foreign_items #146216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Miri: non-deterministic floating point operations in foreign_items #146216
Conversation
The Miri subtree was changed cc @rust-lang/miri |
I have a feeling this is not related to my pr. |
Since the sign of the error is still random, it'd be good to run this at least with a few seeds. When multiple operations are chained in a test, we want to hit the case where they all err in the same direction. |
@rustbot author |
Reminder, once the PR becomes ready for a review, use |
Ran it with @rustbot ready |
@bors try jobs=x86_64-gnu-aux |
…ems-take2, r=<try> Miri: non-deterministic floating point operations in foreign_items try-job: x86_64-gnu-aux
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
src/tools/miri/tests/pass/float.rs
Outdated
assert_approx_eq!(f32::consts::FRAC_PI_4.cos().acos(), f32::consts::FRAC_PI_4, 16); | ||
assert_approx_eq!(f64::consts::FRAC_PI_4.cos().acos(), f64::consts::FRAC_PI_4, 16); | ||
assert_biteq(1.0f32.acos(), 0.0, "acos(1) = 0"); | ||
assert_biteq(1.0f64.acos(), 0.0, "acos(1) = 0"); | ||
|
||
assert_approx_eq!(1.0f32.cosh(), 1.54308f32); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, this line fails now... is the reference value here rounded already? On the playground, the unaltered result is 1.5430806
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah using the more precise value seems to suffice to make the test pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Seems like you'll also have to try
|
1bbd490
to
3008073
Compare
This comment has been minimized.
This comment has been minimized.
💔 Test for 49f8750 failed: CI. Failed jobs:
|
FWIW, I can reproduce this failure with
In fact I see more than just one failure then:
Please double-check that you are running this command in the right working tree; it's odd that this would not fail for you. |
I'm sorry, I was in a hurry and accidentally used @rustbot ready. |
@bors try |
…ems-take2, r=<try> Miri: non-deterministic floating point operations in foreign_items
This comment has been minimized.
This comment has been minimized.
I'm still seeing failures when I run this locally
|
ran (copy/pasted):
And everything passed. |
Yeah also works here now. :) Please clean up the history a little, then we can give this another shot and land it. |
6e6049b
to
e7e06ac
Compare
Sorry for the incomplete testing and thanks for your patience :). I cleaned everything up into the original 3 commits to keep things consistent. I can always split it up if needed. @rustbot ready |
All right, let's hope it sticks this time. @bors r+ rollup=never |
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing fbd8f95 (parent) -> f13ef0d (this PR) Test differencesShow 2 test diffs2 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard f13ef0d75d834c826c9479a5d244bcfb9891df45 --output-dir test-dashboard And then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
Finished benchmarking commit (f13ef0d): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary 1.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 6.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 467.216s -> 467.986s (0.16%) |
…oreign-items-take2, r=RalfJung Miri: non-deterministic floating point operations in foreign_items Take 2 of rust-lang#143906. The last 2 commits are what changed compared to the original pr. Verified the tests using (fish shell): ```fish env MIRIFLAGS="-Zmiri-max-extra-rounding-error -Zmiri-many-seeds" ./x miri --no-fail-fast std core coretests -- f32 f64 ``` r? `@RalfJung`
Take 2 of #143906. The last 2 commits are what changed compared to the original pr.
Verified the tests using (fish shell):
r? @RalfJung