ICC -XCORE -AVX2是否强迫AVX512在Xeon Gold上进行的不利用,如果-O3开启?
根据标题,
下的ICC -O3 -XCORE -AVX2 PROGRAM在ICC -O3 -XCORE -AVX2 PROGRAM上编译的程序
将在ICC -O3 -XCore -avx2 Program.cpp
生成Xeon Gold 61xx上生成AVX512指令
吗?我们的汇编分析似乎没有找到一个,但这并不保证。
谢谢!
As per the title,
Will programs compiled with the intel compiler under
icc -O3 -xCORE-AVX2 program.cpp
Generate AVX512 instructions on a Xeon Gold 61XX?
Our assembler analysis doesn't seem to find one, but that is no guarantee.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在ICC Classic中,不,您可以在不告诉编译器启用编译器的情况下使用内在的任何说明。 (与GCC或Clang不同,您必须启用指令集以使用其内在设备,例如基于LLVM的Intel Oneapi编译器。)
,但编译器不会发出Interinsics以外的AVX-512指令((或Inline ASM),不启用
-March = Skylake-AVX512
或-March =本机
(aka-XHOST
)或类似的选项,暗示-mavx512f
。或pragma或__属性__((目标(“ string”)))
以启用单个功能的AVX-512。对于所有主要的X86编译器来说都是如此,默认情况下,AVX-512不在。
使用
-O3 -March =本机
如果要对正在运行的机器进行优化的代码,就像使用GCC或Clang一样。在ICC Classic中,您还可以使用
_ALLOW_CPU_FEATURES(_FEATURE_AVX512F | _FEATURE_BMI)使用
_ALLOD_CPU_FEATURES使用某些指令集使用某些指令集; Gen。请参阅文档。
也相关: /avx intinisics 回复:GCC/Clang vs. MSVC与ICC。
In ICC classic, no, you can use intrinsics for any instruction without telling the compiler to enable it. (Unlike GCC or clang where you have to enable instruction sets to use their intrinsics, like the LLVM-based Intel OneAPI compiler.)
But the compiler won't emit AVX-512 instructions other than from intrinsics (or inline asm), without enabling a
-march=skylake-avx512
or-march=native
(aka-xHOST
) or similar option that implies-mavx512f
. Or a pragma or__attribute__((target("string")))
to enable AVX-512 for a single function.This is true for all the major x86 compilers, AVX-512 is not on by default.
Use
-O3 -march=native
if you want to make code optimized for the machine you're running on, just like with GCC or clang.In ICC classic, you can also let the compiler use certain instruction-sets on a per-function basis, with
_allow_cpu_features(_FEATURE_AVX512F|_FEATURE_BMI);
which works more like a pragma, affecting compile-time code-gen. See the docs.Also related: The Effect of Architecture When Using SSE / AVX Intrinisics re: gcc/clang vs. MSVC vs. ICC.