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
After #13134 is merged, np.exp and np.log return float32 arrays for float16 inputs. Is the change intended? I could not find docs for it (https://www.numpy.org/devdocs/reference/generated/numpy.exp.html), while it is documented that np.sum casts ints to the default platform integer.
I am sure you already got it, but it will be because of the linear search of the loops, if the "f,f->f" loops are registered first, they are found instead of the "e,e->e" loops.
I thought changing the type to TD('f', astype={'e':'f'}, simd=[('avx2', 'f'), ('avx512f', 'f')]) (adding the astype kwarg) would have solved it, but the test is still failing. Somehow the simd part is not respecting the astype
Activity
charris commentedon May 7, 2019
Looks like an unintended change. @r-devulap @mattip Thoughts? Maybe we need some tests...
mattip commentedon May 7, 2019
Adding tests and looking for a fix
r-devulap commentedon May 7, 2019
Looking into it ..
seberg commentedon May 7, 2019
I am sure you already got it, but it will be because of the linear search of the loops, if the "f,f->f" loops are registered first, they are found instead of the "e,e->e" loops.
seberg commentedon May 7, 2019
Sorry for the spam. (compare also
np.sqrtwhich currently has a funny loop duplication, but not this issue).mattip commentedon May 7, 2019
I thought changing the type to
TD('f', astype={'e':'f'}, simd=[('avx2', 'f'), ('avx512f', 'f')])(adding the astype kwarg) would have solved it, but the test is still failing. Somehow thesimdpart is not respecting theastypemattip commentedon May 7, 2019
Got it, need to not use simd on 'e' which makes sense
[-]exp and log cast float16 to float32[/-][+]BUG: exp and log cast float16 to float32[/+]r-devulap commentedon May 7, 2019
that was quick! thank you @mattip :)