我有配置:Intel(R)Core(TM)i7-4702MQ CPU(具有Haswell架构),Windows 8,Intel C++ Compiller XE 13.0。 我想运行我的AVX2优化方案,并把编译标志:如何验证操作系统是否支持avx2指令
/QaxCORE-AVX2, /QxCORE-AVX2
但是当我运行该程序,我得到错误:
Fatal Error: This program was not built to run in your system. Please verify that both the operating system and the processor support Intel(R) AVX2, BMI, LZCNT, HLE, RTM, and FMA instructions.
我跑这页上给出AVX2 CPU支持测试: How to detect new instruction support in the 4th generation Intel Core processor family。 结果:
This CPU supports ISA extensions introduced in Haswell.
我如何检查我的操作系统支持AVX2扩展,而这可能是错误的原因是什么?对于使用avx2扩展我需要设置/QaxCORE-AVX2
和/QxCORE-AVX2
标志?
UPD:如果我设置标志
/QxAVX
该程序已成功启动。
也许XSAVE被禁用。我不知道如何启用它,但它可能是一个启动配置。 – Mysticial 2014-09-13 06:41:57
@Mysticial我用函数IsProcessorFeaturePresent(PF_XSAVE_ENABLED)创建简单的win32项目。这个函数返回True。 – 2014-09-13 07:20:35
检查什么时候?在编译时?在运行时?无论如何,这更像是一个与市场相关的问题,例如2955U是赛扬正式基于Haswell架构的产品,但它甚至不提供第一代AVX。 – user2485710 2014-09-13 17:52:26