Skip to content
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

Fix float reproducibility tests on Apple Silicon chips #2845

Closed
wants to merge 1 commit into from

Conversation

ChrisThrasher
Copy link
Collaborator

Description

These only need to be disabled on select x86 chips but are fine to run on all Apple CPUs.

These only need to be disabled on select x86 chips but are fine to
run on all Apple CPUs.
Copy link

codecov bot commented Mar 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.17%. Comparing base (a2a3c55) to head (ad36611).
Report is 1 commits behind head on devel.

Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #2845      +/-   ##
==========================================
- Coverage   91.19%   91.17%   -0.02%     
==========================================
  Files         197      197              
  Lines        8379     8379              
==========================================
- Hits         7641     7639       -2     
- Misses        738      740       +2     

@@ -558,7 +558,7 @@ namespace {
// into smaller type when the type is saved into memory. This obviously
// leads to a different answer, than doing the math in the correct precision.
#if ( defined( _MSC_VER ) && _M_IX86_FP < 2 ) || \
( defined( __GNUC__ ) && !defined( __SSE2_MATH__ ) )
( defined( __GNUC__ ) && (defined( __i386__ ) || defined( __x86_64__ )) && !defined( __SSE2_MATH__ ) )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this does not actually fix the tests, this just enables them on M1 machines.

Secondary issue is that the original warning will still be present on platforms that correctly disable the tests.

Full fix is to keep this updated define, but also to

  1. move the ifdef above the block defining all the uniform_fp_test_params
  2. Change the change the tests "uniform_floating_point_distribution can handle unitary ranges" not to rely on uniform_fp_test_params.

@horenmar horenmar closed this in 0a6a2ce Apr 6, 2024
@ChrisThrasher ChrisThrasher deleted the macos_float_reproducibility_tests branch April 6, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants