Removed avx512_calls.c by replacing LUTs with intrinsics / shifts - #357
Conversation
…d to calculate load-mask (taken from simSIMD)
28bd033 to
5a96e4b
Compare
lgarrison
left a comment
There was a problem hiding this comment.
I see a few remaining references to masks_per_misalignment_value_DOUBLE and avx512_calls.c, are those now stale? Odd that CI didn't catch them, but maybe they're behind AVX-512 feature flags.
|
|
||
| for(int64_t j=n_off;j<N2;j+=AVX512_NVEC) { | ||
| AVX512_MASK m_mask_left = (N2 - j) >= AVX512_NVEC ? ~0:masks_per_misalignment_value_DOUBLE[N2-j]; | ||
| AVX512_MASK m_mask_left = (N2 - j) >= AVX512_NVEC ? ~0U:masks_per_misalignment_value_DOUBLE[N2-j]; |
There was a problem hiding this comment.
Is this reference to masks_per_misalignment_value supposed to be changed to the new form?
|
@lgarrison Thanks for picking those trailing references up - I have now checked that all references are now gone. Still not sure how the tests could have passed (or really, how the exes could have built) - only plausible explanation is that the CI machine yesterday did not have a CPU with However, I see that the CI is now failing. I will check on a AVX512 machine and report back |
|
I am very confused - why did the 3 out of 4 CI tests pass in the previous typo-ed xi. Makes me think that we need to have markers for the code changed, and not have the tests pass count if the required ISA was not available on the runner (or perhaps there is a way to request specific runners) |
…et caught since utils/ Makefiles never get invoked)
|
lgarrison
left a comment
There was a problem hiding this comment.
Checked locally, looks good!
|
Thanks @lgarrison - yeah I just checked with a fresh clone on a This PR definitely made me realise how important the tests are, and that we need a proper testing harness that checks whether the Actions runner has |



The AVX512 kernel was the only one that had a C source file for implementing lookup tables (LUTs) for floats and doubles. This has bothered me for a while, but now I finally know how to remove it (well, really the calculating partial load mask was the bottleneck and I got the solution from simSIMD, although simSIMD/numkong now appears to use
_bzhi- which requiresBMI2to be enabled at compile time and available at runtime - so theshiftmethod seemed safer)Ugghh My shell script / editor seems to have made some necessary but unasked for trailing-whitespace fixes as well :(Fixed now