Question

Does /arch:AVX enable AVX2 (with 256-bit integer SIMD instructions and some new FP shuffles) on the Visual Studio 2012 Update 4?

Line of thought:

  • Yes, it enables AVX because VS doesn't mention AVX2. But I think VS can do AVX2 because my intrinsic work.

  • No, it doesn't because AVX and AVX2 are separate CPU features
    (Sandybridge vs. Haswell, or Excavator/Zen vs. Bulldozer),
    just like SSE and SSE2 are separate

AVX2

Était-ce utile?

La solution

It refers to AVX not AVX2. According to Microsoft this applies (mostly) to floating point operations. VS2012 supports AVX2 intrinsic functions regardless of this flag. AVX is available on i3, i5 and i7 variants of SandyBridge and IvyBridge. AVX2 started with Haswell.

Autres conseils

The using of "/arch:AVX" compiler options allows to use AVX2 integer instructions more efficiently. If this options is disabled then code with AVX2 instructions may be slower then with SSE2 (because there are many switchings between SSE2 and AVX2).

I have already confirmed that Visual Studio 2013 Update 5, when /arch:AVX is enabled, still compiles certain part of the code into AVX2, currently there is no option to say AVX only, which I hope Microsoft would fix.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top