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

BUG: Fix overflow warning on apple silicon #18571

Merged
merged 2 commits into from
Mar 17, 2021
Merged

BUG: Fix overflow warning on apple silicon #18571

merged 2 commits into from
Mar 17, 2021

Conversation

isuruf
Copy link
Contributor

@isuruf isuruf commented Mar 7, 2021

Alternative to #17712

@seberg
Copy link
Member

seberg commented Mar 7, 2021

@isuruf, I know that did not work in gh-18555 which may actually just be the identical issue?

Before we add more clang workaround, can you make sure to compiling with -ffp-exception-behavior=strict? We have to make that flag default on clang and make sure to not add any workarounds for clang bugs that are actually just bad compiler defaults.

I am not on top of these efforts here, so ignore if this is obviously unhelpful...

@isuruf
Copy link
Contributor Author

isuruf commented Mar 7, 2021

-ffp-exception-behavior=strict

The exception is still there if I add that flag without this PR.

@rgommers
Copy link
Member

The one PyPy failure seems unrelated:

____________________ TestRandomDist.test_choice_exceptions _____________________
...
TypeError: __format__() missing 1 required positional argument: 'spec'

Let's see if there's more opinions on a preference of this PR vs. gh-17712. I'd be inclined to merge this one.

@erykoff
Copy link

erykoff commented Mar 13, 2021

I think this would be fine. I think my solution on #17712 would be a bit cleaner (and have the advantage of unifying the code path of single-value and vector computations), but I was stymied by the time taken to make it work with the 128-bit code path. This is certainly a simpler and more direct solution.

Co-authored-by: Matti Picus <matti.picus@gmail.com>
@mattip mattip merged commit ee9c8f8 into numpy:main Mar 17, 2021
@isuruf isuruf deleted the overflow branch March 25, 2021 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants