how to enable/disable AVX2 compiling optimization in visual studio 2019?

hitbuyi 46 Reputation points
2022-04-29T14:17:03.84+00:00

when I compile Tensorflow lib without setting AVX2 option, when the lib is called in visual studio 2019, it prompts following information

2022-04-29 22:10:00.005405: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2

So I want to disable AVX2 optimization in visual studio 2019, where to disable the AVX2 in vs2019?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,736 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,581 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Viorel 113.7K Reputation points
    2022-04-29T19:26:00.867+00:00

    Go to the Project Properties dialog, select the configuration and platform, and see this option: C/C++, Code Generation, Enable Enhanced Instruction Set.

    1 person found this answer helpful.
    0 comments No comments