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
I was able to reproduce this on my SKX, but only when built with clang7.0 (it passes when run with gcc7 and clang6.0). I will debug later today to see where it's coming from ..
This is the instruction that is raising invalid exception: xmin_mask = _mm256_cmp_ps(x, _mm256_set1_ps(xmin), _CMP_LE_OQ); when x is a nan. Not sure whats special with clang7.0
This test test_exp_values only cares about the value of the output, I think it might be okay to disable FPE exceptions just for this test with with np.errstate(all='ignore'):
@mattip We have a mechanism for library math functions, but this looks like a constant macro which is probably used to direct a compilation path. If we can detect it during configuration and have a fall back function we can fix it, but I'm not sure what the fallback function would be.
Activity
r-devulap commentedon May 19, 2019
I was able to reproduce this on my SKX, but only when built with clang7.0 (it passes when run with gcc7 and clang6.0). I will debug later today to see where it's coming from ..
r-devulap commentedon May 19, 2019
This is the instruction that is raising invalid exception:
xmin_mask = _mm256_cmp_ps(x, _mm256_set1_ps(xmin), _CMP_LE_OQ);whenxis anan. Not sure whats special with clang7.0mattip commentedon May 19, 2019
maybe a bug in clang?
r-devulap commentedon May 19, 2019
probably,
_CMP_LE_OQis supposed to non-signaling and as far as I understand that shouldn't set a floating point exception.r-devulap commentedon May 19, 2019
Yeah I think this is a clang7 behavior which seems incorrect. I wrote a small test case to confirm this:
With gcc and clang6.0:
with clang7.0, it sets the invalid bit which I think is incorrect.
r-devulap commentedon May 19, 2019
This test
test_exp_valuesonly cares about the value of the output, I think it might be okay to disable FPE exceptions just for this test with withnp.errstate(all='ignore'):mattip commentedon May 19, 2019
@charris: We have a mechanism for whitelist/blacklisting compiler bugs, how does it work?
charris commentedon May 19, 2019
@mattip We have a mechanism for library math functions, but this looks like a constant macro which is probably used to direct a compilation path. If we can detect it during configuration and have a fall back function we can fix it, but I'm not sure what the fallback function would be.
charris commentedon May 19, 2019
_CMP_LE_OQI wonder what the actual value of this macro is? We could possibly detect/fix that, but it might be architecture dependent.r-devulap commentedon May 20, 2019
Its 18 and I think it should be the same across x86 architecture. See https://software.intel.com/sites/landingpage/IntrinsicsGuide/#expand=3004,3045,3005,2822,737&text=cmp_ps
r-devulap commentedon May 28, 2019
perhaps this and issue #13400 can be closed now?
tylerjereddy commentedon May 29, 2019
I can definitely close this because I confirmed the fix this morning.
Perhaps Julian should close the other, though it looks connected at a quick glance.
tylerjereddy commentedon May 29, 2019
Thanks @r-devulap