Repository navigation
Disable AVX for nocona - #9603
Conversation
Because VMs may report nocona as the cpu-name but has AVX512 support. This seems to cause the LLVM SVML-pass incorrectly use `<8 x double>` vectors.
|
BFID: |
stuartarchibald
left a comment
There was a problem hiding this comment.
Thanks for the patch. A few minor comments to address else looks good. I do wonder about whether there are other approaches to detecting this sort of problem, however, I'm hoping that this will work around the reported issue.
| cpu_name = ll.get_host_cpu_name() | ||
| return cpu_name not in ('corei7-avx', 'core-avx-i', | ||
| 'sandybridge', 'ivybridge') | ||
| cpu_name = CPU_NAME or ll.get_host_cpu_name() |
There was a problem hiding this comment.
I guess that this is technically fixing a bug, in that a prescribed NUMBA_CPU_NAME was previously ignored in the logic surrounding AVX use. Should a test be added that runs if get_host_cpu_name() returns anything other than nocona and the test asserts that a prescribed NUMBA_CPU_NAME=nocona would result in config.ENABLE_AVX==False?
|
Testing locally, this does seem to resolve #9582 even when I have |
|
It also works locally for me #9582 (comment) |
Co-authored-by: stuartarchibald <stuartarchibald@users.noreply.github.com>
|
rerun smoketest. BFID: |
esc
left a comment
There was a problem hiding this comment.
Tried this locally, executed tests, modified tests to watch them fail, looks good to me.
| code = ("from numba.core import config\n" | ||
| "print('---->', bool(config.ENABLE_AVX))\n" | ||
| "assert not config.ENABLE_AVX") | ||
| out, err = run_in_subprocess(dedent(code), env=new_env) |
There was a problem hiding this comment.
Not suggesting changing anything now, especially as this is already RTM, but I think @TestCase.run_in_subprocess is a simpler way of doing this - it allows env vars for the subprocess to be set in the decorator args.
Disable AVX for nocona
Maybe a fix for #9582
Because VMs may report nocona as the cpu-name but has AVX512 support. This seems to cause the LLVM SVML-pass incorrectly use
<8 x double>vectors.Update. user confirmed.
Fixes #9582