When I use icx/icpx and -xCORE-AVX512 flag to compile program, there is not the way I understood it. The source code : https://godbolt.org/z/sK1hfn5a8 . When I not use -xCORE-AVX512 flag to compile the program it would generate four version of 'memset' function:
Thanks for reaching out to us.
>> My understand about -xCORE-AVX512 is it would enable to generate AVX512 Instruction. But when I use the flag it not use AVX512 instruction in fact.
You need to add an additional option along with -xCORE-AVX512.
By using this special new flag [Q/q]opt-zmm-usage=high (which should be used in conjunction with -xCORE-AVX512), you'll get full AVX-512 ISA with 512-bits-wide operands.
So try compiling the code with -xCore-AVX512 -qopt-zmm-usage=high, you could see an AVX512 instruction gets generated <__intel_mic_avx512f_memset>
Hope this answers your question.
For more details, please refer
>> Can I use -xCore-AVX512 option on icpx which my CPU is Haswell microarchitecture?
You can use that option if your system supports AVX512 registers. You can get the information by using the below command.
Please find the below screenshot to get detailed information
Can I use -xCore-AVX512 option on icpx which my CPU is Haswell microarchitecture? Will there be any problem?
Yes, there will be a problem. You won't be able to run the binary built with -xCORE-AVX512 on Haswell.
We assume that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored.
Have a Good day!