I'm reading this document about how to compile C/C++ code using the Intel C++ compiler and AVX512 support on a Intel Knights Landing.
However, I'm a little bit confused about this part:
-xMIC-AVX512: use this option to generate AVX-512F, AVX-512CD, AVX-512ER and AVX-512FP.
-xCORE-AVX512: use this option to generate AVX-512F, AVX-512CD, AVX-512BW, AVX-512DQ and AVX-512VL.
For example, to generate Intel AVX-512 instructions for the Intel Xeon Phi processor x200, you should use the option –xMIC-AVX512. For example, on a Linux system
$ icc –xMIC-AVX512 application.c This compiler option is useful when you want to build a huge binary for the Intel Xeon Phi processor x200. Instead of building it on the coprocessor where it will take more time, build it on an Intel Xeon processor-based machine
My Xeon Phi KNL doesn't have a coprocessor (No need to ssh micX or to compile with the -mmic
flag). However, I don't understand if it's better to use the -xMIC
or -xCORE
?
In second place about -ax
instead of -x
:
This compiler option is useful when you try to build a binary that can run on multiple platforms.
So -ax
is used for cross-platform support, but is there any performance difference comapred to -x
?
-xCORE
will not work on KNL, because it doesn't support AVX-512BW, AVX-512DQ and AVX-512VL. – Ilya Verbin