AVX512 intrinsics

I’m using pgcc version 19.4 on Linux.

I’m trying to compile the following program on an Intel Skylake machine that supports AVX512F.

#include <x86intrin.h>
#include <stdio.h>

float C[16];

int main() {
  __m512 a = _mm512_set1_ps(3.);
  __m512 b = _mm512_set1_ps(2.);
  __m512 cv = _mm512_mul_ps(a, b);
  _mm512_storeu_ps(C, cv);
  for (size_t i = 0; i < 16; ++i) {
    printf("%.2f ", C[i]);
  return 0;

When I compile with

pgcc -fast intrinsics.c

I get the error

PGC-S-0040-Illegal use of symbol, __m512 (intrinsics.c: 7)
PGC-W-0156-Type not specified, 'int' assumed (intrinsics.c: 7)
PGC-S-0040-Illegal use of symbol, __m512 (intrinsics.c: 8)
PGC-W-0156-Type not specified, 'int' assumed (intrinsics.c: 8)
PGC-S-0040-Illegal use of symbol, __m512 (intrinsics.c: 9)
PGC-W-0156-Type not specified, 'int' assumed (intrinsics.c: 9)
PGC/x86-64 Linux 19.4-0: compilation completed with severe errors

I also tried

pgcc -tp=skylake -fast intrinsics.c

for which I get the following error instead.

PGC-F-0249-#error --  "MMX instruction set not enabled" (/opt/pgi/linux86-64-llvm/19.4/include/pgi/mmintrin.h: 27)
PGC/x86-64 Linux 19.4-0: compilation aborted

I checked that this is valid AVX512 code by compiling it with GCC and it compiles and runs correctly.

While the motivation behind OpenACC is portability, and intrinsics are not recommended, the purpose of our experiments is to see the difference in execution time on a single core when using intrinsics directly and letting the compiler handle code generation.

Am I missing some flags, are some header files in my machine not set up correctly, or does the compiler not support AVX512 intrinsics at the moment?


It would seem to me that this is a bug. There is some support for AVX-512 instructions, but I don’t think it is comprehensive yet. I’ve filed TPR #27520 for an engineer to take a look at.

Thanks. I’ll be checking for updates then.

FYI this should be fixed with 19.9+