New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to build with optimization flag AVX2 #7660
Comments
AVX2 is not an optimization flag. Use |
MAVX2 is not an optimization flag. You need to make sure what you are passing there works on your compiler. Try |
Thanks, solved the problem. Can you confirm for multiple flags parameters should be |
I believe you only need -mavx2 to get all previous sse extensions (check the man page or gcc documentation for more details). If you really want to use multiple, you'd probably just separate them with spaces i.e. "-mavx2 -msse4.2" etc. |
Automatically closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks! |
i think when you keep the default "-march=native"-flag it will detect all your available hardware instructions. |
@n1kt0 I left this default, cause no issue but when I am working it gives me a warning. When I tried to configure it ran into issues. |
@CodeLoverr gives it you a warning that it wasn't compiled with the flags set? |
OS : Ubuntu 16.041
CPU : Intel i7 6700k
Which supports avx2.0.
I am trying to install Tensorflow from sources.
What I am doing
`./configure
Please specify the location of python. [Default is /usr/bin/python]:
Please specify optimization flags to use during compilation [Default is -march=native]: AVX2
Do you wish to use jemalloc as the malloc implementation? (Linux only) [Y/n] y
jemalloc enabled on Linux
Do you wish to build TensorFlow with Google Cloud Platform support? [y/N] n
No Google Cloud Platform support will be enabled for TensorFlow
Do you wish to build TensorFlow with Hadoop File System support? [y/N] n
No Hadoop File System support will be enabled for TensorFlow
Do you wish to build TensorFlow with the XLA just-in-time compiler (experimental)? [y/N] n
No XLA JIT support will be enabled for TensorFlow
Found possible Python library paths:
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages
Please input the desired Python library path to use. Default is [/usr/local/lib/python2.7/dist-packages]
Using python library path: /usr/local/lib/python2.7/dist-packages
Do you wish to build TensorFlow with OpenCL support? [y/N] n
No OpenCL support will be enabled for TensorFlow
Do you wish to build TensorFlow with CUDA support? [y/N] y
CUDA support will be enabled for TensorFlow
Please specify which gcc should be used by nvcc as the host compiler. [Default is /usr/bin/gcc]:
Please specify the CUDA SDK version you want to use, e.g. 7.0. [Leave empty to use system default]: 8.0
Please specify the location where CUDA 8.0 toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]:
Please specify the Cudnn version you want to use. [Leave empty to use system default]: 5.1.5
Please specify the location where cuDNN 5.1.5 library is installed. Refer to README.md for more details. [Default is /usr/local/cuda]:
Please specify a list of comma-separated Cuda compute capabilities you want to build with.
You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus.
Please note that each additional compute capability significantly increases your build time and binary size.
[Default is: "3.5,5.2"]: 6.1
Extracting Bazel installation...
.....
INFO: Starting clean (this may take a while). Consider using --expunge_async if the clean takes more than several minutes.
.....
INFO: All external dependencies fetched successfully.
Configuration finished
`
Now when I try to build got error,
bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package INFO: Found 1 target... ERROR: /home/hannan/.cache/bazel/_bazel_hannan/45070a52d8b4aeac18b16b18e9aeca76/external/nanopb_git/BUILD.bazel:8:1: C++ compilation of rule '@nanopb_git//:nanopb' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter ... (remaining 36 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1. gcc: error: AVX2: No such file or directory Target //tensorflow/tools/pip_package:build_pip_package failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 5.002s, Critical Path: 2.46s
If I go with out providing optimization flag its work fine.
The text was updated successfully, but these errors were encountered: