-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Query AVX2 and AVX512VL support when selecting x86 kernels #1949
Conversation
I believe the test here are testing hardware support. (from CPUID). OS support bit are in XCR0, same as AVX. See the bit assignment in https://en.wikipedia.org/wiki/Control_register#XCR0. In julia (and I believe LLVM) we conservatively check all bits from 5 to 7 (i.e. |
Indeed, thanks. Hope I got it right now, as I do not have any AVX512 hardware to test this on. |
Didn't check all the bits but it looks right to me as well.... |
I do have a Xeon Skylake system with AVX512 running Linux that I could test on. However, it's not clear that I could provide a complete test, since the main problem here is with OS's that disallow the use of AVX512 instructions on hardware that is otherwise capable. On my machine, the DYNAMIC_ARCH build should figure out that it has AVX512 and use those kernels. How could I test that this is working correctly? |
@brianborchers the original issue occurred for me using docker which seems to disable avx512. I can test this when I’m back at my iMac next week. |
If it does not detect a specific capability, the DYNAMIC_ARCH build is supposed to issue a warning about falling back to a less capable cpu. Unfortunately i seem to have missed this in the SkylakeX case, although I preprared the message. Will update this PR in a minute. |
Travis CI seems to be timing out while still installing dependencies on OSX... |
For #1947 (and corresponding earlier cases involving Haswell) where VM or OS limitations made otherwise standard features of the correctly detected CPU model unavailable.