Skip to content

Built tensorflow CPU mode with SIMD_OPTIONS but when when opening session it warns it wasn't compiled to use SSE #10199

@serchsm

Description

@serchsm

Please go to Stack Overflow for help and support:

http://stackoverflow.com/questions/tagged/tensorflow

If you open a GitHub issue, here is our policy:

  1. It must be a bug or a feature request.
  2. The form below must be filled out.

Here's why we have that policy: TensorFlow developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.


System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10. Intel Core i7-6600U
  • TensorFlow installed from (source or binary): Source
  • TensorFlow version (use command below):1.2.0-rc0
  • Bazel version (if compiling from source): No
  • CUDA/cuDNN version:No
  • GPU model and memory:No
  • Exact command to reproduce:
    I built tensorflow on Windows following the instructions from
    https://github.com/tensorflow/tensorflow/tree/r0.12/tensorflow/contrib/cmake
    My goal was to enable the SIMD options for performance improvements.
  1. Set up toolchain for for 64-bit: vcvarsall amd64
  2. Invoked CMAKE
    C:\Projects\tensorflow\tensorflow\contrib\cmake\build>cmake .. -A x64 -DCMAKE_BUILD_TYPE=Release -DSWIG_EXECUTABLE=C:/tools/swigwin-3.0.12\swigwin-3.0.12/swig.exe -DPYTHON_EXECUTABLE=C:\Users\sergio.murillo\AppData\Local\Programs\Python\Python35/PYTHON.EXE -DPYTHON_LIBRARIES=C:\Users\sergio.murillo\AppData\Local\Programs\Python\Python35\libs\python35.lib -Dtensorflow_WIN_CPU_SIMD_OPTIONS=/arch:AVX
  3. To build the PIP package
    MSBuild /p:Configuration=Release /filelogger tf_python_build_pip_package.vcxproj
    It build with no errors.
  4. Install whl
    pip install .\tf_python\dist\tensorflow-1.2.0rc0-cp35-cp35m-win_amd64.whl
  5. Validate installation

import tensorflow as tf

hello = tf.constant('Hello, Tensorflow!')
sess = tf.Session()

You can collect some of this information using our environment capture script:

https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh

You can obtain the TensorFlow version with

python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"

Describe the problem

Describe the problem clearly here. Be sure to convey here why it's a bug in TensorFlow or a feature request.

I built tensorflow on Windows following the instructions from
https://github.com/tensorflow/tensorflow/tree/r0.12/tensorflow/contrib/cmake
My goal was to enable the SIMD options for performance improvements. It builds without errors, but when I open a tensorflow session it still shows the warnings telling that SIMD was not enabled.

  1. Set up toolchain for for 64-bit: vcvarsall amd64
  2. Invoked CMAKE
    C:\Projects\tensorflow\tensorflow\contrib\cmake\build>cmake .. -A x64 -DCMAKE_BUILD_TYPE=Release -DSWIG_EXECUTABLE=C:/tools/swigwin-3.0.12\swigwin-3.0.12/swig.exe -DPYTHON_EXECUTABLE=C:\Users\sergio.murillo\AppData\Local\Programs\Python\Python35/PYTHON.EXE -DPYTHON_LIBRARIES=C:\Users\sergio.murillo\AppData\Local\Programs\Python\Python35\libs\python35.lib -Dtensorflow_WIN_CPU_SIMD_OPTIONS=/arch:AVX
  3. To build the PIP package
    MSBuild /p:Configuration=Release /filelogger tf_python_build_pip_package.vcxproj
    It build with no errors.
  4. Install whl
    pip install .\tf_python\dist\tensorflow-1.2.0rc0-cp35-cp35m-win_amd64.whl
  5. Validate installation: This is when despite compiling and building without errors, I see the warnings about the SIMD instructions that should have been enabled in CMAKE with -Dtensorflow_WIN_CPU_SIMD_OPTIONS=/arch:AVX

import tensorflow as tf
hello = tf.constant('Hello, Tensorflow!')
sess = tf.Session()
2017-05-25 14:23:37.872523: W c:\projects\tensorflow\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE instructions, but these are available on your machine and could speed up CPU computations.
2017-05-25 14:23:37.873758: W c:\projects\tensorflow\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE2 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-25 14:23:37.873870: W c:\projects\tensorflow\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-25 14:23:37.874002: W c:\projects\tensorflow\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-25 14:23:37.874191: W c:\projects\tensorflow\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-25 14:23:37.874379: W c:\projects\tensorflow\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-25 14:23:37.874565: W c:\projects\tensorflow\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.

I followed the instructions, but it seems that SIMD options were not build/compiled. Did I missed something?
Thanks!

Source code / logs

Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.

msbuild.zip

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions