0

I'm using _mm512_load_epi32 function in my code, and it is working on my laptop that has a Core i7-11800H, but when I run the same code on a server that has a Xeon Platinum 8259CL (so Skylake cpu if I'm not wrong) it fails.

Is it because this intruction is not supported? I tried with _mm512_loadu_epi32 , I also made sure my memory address was aligned, but same result.

I tried using cpu detection as Agner Fog uses in his vector class library. But I have same AVX512 instructions supported.

Am I missing something?

Thanks,

Gerald
  • 690
  • 4
  • 13
  • It is not skylake but cascade lake, so more recent, but anyway, AVX512F should be supported. https://github.com/twest820/AVX-512/blob/master/AVX-512.xlsx – Gerald May 08 '23 at 13:50
  • Misalignment would give a different error by the way, not that that helps any.. – harold May 08 '23 at 13:51
  • Thanks @harold, well, at least I know , that doesn't solve the pb, but helps to understand :) – Gerald May 08 '23 at 14:02
  • Are you running in a VM that doesn't pass through AVX-512? If it's Linux, check `grep -o 'avx[^ ]*' /proc/cpuinfo`. Are you sure the SIGILL is on a `vmovaps` instruction, not some later AVX-512 instruction that your Ice Lake supports but your Cascade Lake doesn't? (Run it under GDB, use `disas` or `layout asm` when it stops at the fault.) – Peter Cordes May 08 '23 at 14:29
  • It is an aws instance but on windows. Can I check a similar thing on windows?I'll try so see where it fails exactly. – Gerald May 08 '23 at 14:47
  • If you're using Visual Studio, debug the program and when you get the error, go to the Disassembly window (if you don't have it open already, open it with Debug > Windows > Disassembly). Then you should see the exact instruction that triggered the exception. – harold May 08 '23 at 15:04
  • 1
    If your server doesn't have good debug facilities, you could try using SDE on your desktop to emulate an SKX or CSL CPU, to detect any usage of instructions it won't support. https://www.intel.com/content/www/us/en/developer/articles/tool/software-development-emulator.html . [How to test AVX-512 instructions w/o supported hardware?](https://stackoverflow.com/q/51805127) is the opposite use-case. [Scan binary for CPU feature usage](https://stackoverflow.com/q/72466925) suggests SDE or other emulators for detecting instructions you didn't mean to use. – Peter Cordes May 08 '23 at 16:03
  • [Disabling AVX2 in CPU for testing purposes](https://stackoverflow.com/q/55762372) is specifically about emulating a CPU with less features than your actual hardware, for this kind of testing. – Peter Cordes May 08 '23 at 16:05
  • It fails on : vmovups zmm0,zmmword ptr [r10] – Gerald May 08 '23 at 17:25
  • It looks like it is connected to aws hypervisor. Is there a way to detect if an instruction is really supported by the cpu? caling the instruction and trying to catch the illegal instruction is probably not going to work. – Gerald May 08 '23 at 18:41
  • So the problem was coming from the OS.. Windows Server 2012 which is too old to handle AVX512. It works fine with Windows Server 2022. – Gerald May 11 '23 at 09:56

0 Answers0