SSE2 option in Visual C++ (x64)

后端 未结 3 2024
失恋的感觉
失恋的感觉 2020-12-29 19:47

I\'ve added x64 configuration to my C++ project to compile 64-bit version of my app. Everything looks fine, but compiler gives the following warning:

`cl : C         


        
3条回答
  •  醉话见心
    2020-12-29 20:06

    The compiler option /arch:AVX will not work on old CPUs hence you need to ensure your CPU supports it. I ran into this issues when I had to re-compile the 1.12 tensorflow package for my old Xeon CPU which does not support.

    I have switched on /arch:SSE2 (as Kirill) posted above but getting exactly same issue. The Microsoft compiler issues a warning (INFO) that this option will be ignored.

    Command line warning D9002 : ignoring unknown option '/arch:SSE2'
    

    From the Microsoft documentation my understanding is that this option is only available on x86 and that does not make sense to me either.

    However on MSDN says:

    /arch:SSE and /arch:SSE2 are only available when you compile for the x86 platform.
    

    and that SSE is used on x64 anyways. Hence I just removed the option now.

提交回复
热议问题