Commit fde9e28
peng.li24
ci: fix SIGILL on Azure VMs — add -mprefer-vector-width=256
GitHub Actions ubuntu-latest runners (Azure) expose avx512f in
/proc/cpuinfo (CPUID) but have ZMM state disabled by hypervisor.
__builtin_cpu_supports correctly returns false, so the SVML bridge
avoids AVX-512 paths. But GCC auto-vectorizer with -mavx512f can emit
ZMM instructions in *any* loop — those SIGILL when ZMM state is off.
Fix: add -mprefer-vector-width=256 to limit auto-vectorization to
256-bit. Explicit __attribute__((target("avx512f"))) functions with
runtime __builtin_cpu_supports guards are unaffected.
README: document -mprefer-vector-width=256 as a 4th required flag.1 parent 782eec9 commit fde9e28
2 files changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
118 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| |||
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| 128 | + | |
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
| |||
0 commit comments