--
You received this message because you are subscribed to the Google Groups "TensorFlow Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@tensorflow.org.
Visit this group at https://groups.google.com/a/tensorflow.org/group/developers/.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/developers/bd6a9a05-2d55-41b8-9557-3b8c77500497%40tensorflow.org.
-march=haswell will give you avx and avx2 instructions. Depending on your gcc version, you need either -march=ivybridge or -march=corei7-avx. I believe you can also add -mno-avx2 or something like that
Clayne
From: George Sterpu <george...@gmail.com>
Sent: Friday, July 6, 2018 3:25 PM
To: Tarun Khanna <tarun...@gmail.com>
Cc: TensorFlow Developers <devel...@tensorflow.org>
Subject: Re: configuring tensorflow to compile without avx2 support
Hi Tarun,
Can you try adding:
export CC_OPT_FLAGS="-march=haswell"
before your bazel build command ?
On 6 July 2018 at 23:55, Tarun Khanna <tarun...@gmail.com> wrote:
I need to build tensorflow for a linux based platform. I followed the instructions here to build and run the python version of the library. However, when I run it complains that tensorflow was compiled with avx2 but the current hardware doesn't support it. So, I tried building it without the --config=opt option to the configure script. I am able to run tensorflow with that configuration however I get the warning that SSE4.1 SSE4.2 AVX are available on the CPU and tensorflow was compiled to not use them.
How do I configure and build tensorflow so it's compiled only without the avx2 instructions?
Thanks.
--
You received this message because you are subscribed to the Google Groups "TensorFlow Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@tensorflow.org.
Visit this group at https://groups.google.com/a/tensorflow.org/group/developers/.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/developers/bd6a9a05-2d55-41b8-9557-3b8c77500497%40tensorflow.org.
--
You received this message because you are subscribed to the Google Groups "TensorFlow Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@tensorflow.org.
Visit this group at
https://groups.google.com/a/tensorflow.org/group/developers/.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/developers/CAJXpPCQu%2BoAzrzqamGETkQP60kn76h2rq4q2QNYSBjaAhagevw%40mail.gmail.com.
[SNIP]
How do I configure and build tensorflow so it's compiled only without the avx2 instructions?
[SNIP]
How do I configure and build tensorflow so it's compiled only without the avx2 instructions?
--
You received this message because you are subscribed to the Google Groups "TensorFlow Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@tensorflow.org.
Visit this group at https://groups.google.com/a/tensorflow.org/group/developers/.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/developers/BL0PR01MB409998386682F0B03C5BFDACB8460%40BL0PR01MB4099.prod.exchangelabs.com.
--
You received this message because you are subscribed to the Google Groups "TensorFlow Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@tensorflow.org.
Visit this group at https://groups.google.com/a/tensorflow.org/group/developers/.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/developers/BL0PR01MB409998386682F0B03C5BFDACB8460%40BL0PR01MB4099.prod.exchangelabs.com.
Hey,I assume you are building on a different machine than you are going to be running on. In which case run this on the destination machine to find out what flags are the most optimal for it.gcc -march=core2 -E -v - </dev/null 2>&1 | grep cc1Then when you build use the flags it spits out. Pass them when ./configure asks which flags to optimize.Also -mno-avx2 will make sure it doesn't use any avx2 instructions. But you should use the above command to find all the flags for the most optimal results. Just make sure you check the march=native on the right machine. If you are going to be deploying on many different machines, you can run that command on all and then use only the flags common to all machines.There is also some documentation on the gentoo wiki about which cflags are safe on some common generations.-- Jason
On Sat, Jul 7, 2018, 12:00 Lakshay Garg <laks...@outlook.in> wrote:
--On Fri, 6 Jul 2018 at 14:55, Tarun Khanna <tarun...@gmail.com> wrote:
[SNIP]
How do I configure and build tensorflow so it's compiled only without the avx2 instructions?You can compile with -march=native. This will enable only the instructions which are supported by the hardware you are compiling on. Also, I have a few binaries over at https://github.com/lakshayg/tensorflow-build if you would like to use pre-built binaries.
Lakshay
You received this message because you are subscribed to the Google Groups "TensorFlow Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@tensorflow.org.
Visit this group at https://groups.google.com/a/tensorflow.org/group/developers/.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/developers/BL0PR01MB409998386682F0B03C5BFDACB8460%40BL0PR01MB4099.prod.exchangelabs.com.
On Jul 7, 2018 12:00, "Lakshay Garg" <laks...@outlook.in> wrote:
--On Fri, 6 Jul 2018 at 14:55, Tarun Khanna <tarun...@gmail.com> wrote:
[SNIP]
How do I configure and build tensorflow so it's compiled only without the avx2 instructions?You can compile with -march=native. This will enable only the instructions which are supported by the hardware you are compiling on. Also, I have a few binaries over at https://github.com/lakshayg/tensorflow-build if you would like to use pre-built binaries.
Lakshay
You received this message because you are subscribed to the Google Groups "TensorFlow Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/developers/BL0PR01MB409998386682F0B03C5BFDACB8460%40BL0PR01MB4099.prod.exchangelabs.com.
--
You received this message because you are subscribed to the Google Groups "TensorFlow Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/developers/CAPuKSJa-5ut5%3DAyAYZ%2BjKQ8KFRY8XAfhfv3v8a1d%2BDybQ-oY4g%40mail.gmail.com.
After playing around with different options. The one that works well is this one. -march=core2 -mavx -msse4.1 -msse4.2 -mpclmul -mpopcnt -maes -mno-avx2.Tarun
On Mon, Jul 9, 2018 at 9:39 AM Robison, Clayne B <clayne....@intel.com> wrote:
The default is what gets set at the end of ./configure which is -march=native
Clayne
Thanks, I'll try those out. It takes a while to build. Is there a way to figure what option is set before it finishes building?
On Fri, Jul 6, 2018, 6:30 PM Robison, Clayne B <clayne....@intel.com> wrote:
-march=haswell will give you avx and avx2 instructions. Depending on your gcc version, you need either -march=ivybridge or -march=corei7-avx. I believe you can also add -mno-avx2 or something like that
Clayne
From: George Sterpu <george...@gmail.com>
Sent: Friday, July 6, 2018 3:25 PM
To: Tarun Khanna <tarun...@gmail.com>
Cc: TensorFlow Developers <devel...@tensorflow.org>
Subject: Re: configuring tensorflow to compile without avx2 support
Hi Tarun,
Can you try adding:
export CC_OPT_FLAGS="-march=haswell"
before your bazel build command ?
On 6 July 2018 at 23:55, Tarun Khanna <tarun...@gmail.com> wrote:
I need to build tensorflow for a linux based platform. I followed the instructions here to build and run the python version of the library. However, when I run it complains that tensorflow was compiled with avx2 but the current hardware doesn't support it. So, I tried building it without the --config=opt option to the configure script. I am able to run tensorflow with that configuration however I get the warning that SSE4.1 SSE4.2 AVX are available on the CPU and tensorflow was compiled to not use them.
How do I configure and build tensorflow so it's compiled only without the avx2 instructions?
Thanks.
--
You received this message because you are subscribed to the Google Groups "TensorFlow Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deve...@tensorflow.org.
Visit this group at https://groups.google.com/a/tensorflow.org/group/developers/.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/developers/bd6a9a05-2d55-41b8-9557-3b8c77500497%40tensorflow.org.
--
You received this message because you are subscribed to the Google Groups "TensorFlow Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deve...@tensorflow.org.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/developers/5fef428d-6563-4410-9cc6-0f41aa257d08%40tensorflow.org.
Configure doesn't ask about AVX
--
You received this message because you are subscribed to the Google Groups "TensorFlow Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/developers/8d82a047-39b1-4cf7-aa1b-115a16f66fc3%40tensorflow.org.
It asks about the default cpu optimizations to use when you run configure.And if you do not enter anything, by default it compiles with -march=native when you to --config=opt.You can simply remove `--config=opt` from your command line. Or you can enter -mavx or -msse4 when asked when running `./configure`
On Mon, Nov 4, 2019 at 9:25 AM Konrád Lőrinczi <klor...@gmail.com> wrote:
Configure doesn't ask about AVX
--
You received this message because you are subscribed to the Google Groups "TensorFlow Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to devel...@tensorflow.org.
It asks about the default cpu optimizations to use when you run configure.And if you do not enter anything, by default it compiles with -march=native when you to --config=opt.You can simply remove `--config=opt` from your command line. Or you can enter -mavx or -msse4 when asked when running `./configure`
On Mon, Nov 4, 2019 at 9:25 AM Konrád Lőrinczi <klor...@gmail.com> wrote:
Configure doesn't ask about AVX
--
You received this message because you are subscribed to the Google Groups "TensorFlow Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to devel...@tensorflow.org.