mdhaber / scipy

Scipy library main repository
http://scipy.org/scipylib/
BSD 3-Clause "New" or "Revised" License
1 stars 5 forks source link

WIP: fixes for M1 speculative execution #97

Open mckib2 opened 1 year ago

mckib2 commented 1 year ago

Reference issue

What does this implement/fix?

Additional information

mckib2 commented 1 year ago

@mdhaber This resolves all errors on this branch locally on the M1 Mac Mini. Still waiting to hear back from upstream if they can reproduce the issues/want to accept theses

The evidence seems to suggest that M1 speculative execution is failing to suppress failed branch exceptions in these cases. So the fixes are to try to dance around what we think the speculative execution is going to run into. Not sure if these issues are present in the latest firmware/updates for MacOS, so I'm delaying updating the Mac Mini

mdhaber commented 1 year ago

Ooh, let me make sure I understand correctly:

The evidence seems to suggest that M1 speculative execution is failing to suppress failed branch exceptions in these cases.

Does this mean that it is supposed to be suppressing them but doesn't, and that an update to the firmware might fix that?

This suggests to me that the warnings are indeed harmless, if they are meant to be suppressed?

mckib2 commented 1 year ago

Does this mean that it is supposed to be suppressing them but doesn't, and that an update to the firmware might fix that?

It could be firmware or just an OS upgrade. The SciPy job is using a 9 month old image, so we might try bumping that to see if it helps

This suggests to me that the warnings are indeed harmless, if they are meant to be suppressed?

Yes, they are harmless, just annoying. Failed branches can catastrophically fail and the user shouldn't see any indication

mckib2 commented 1 year ago

This line could be changed to point to the latest image -- are you able to run that pipeline from your SciPy fork or this testing that must be done in the main repo?

mdhaber commented 1 year ago

Go ahead and test in the main repo. It's worth it.