These are chat archives for beniz/deepdetect

10th
May 2017
Marc Reichman
@marcreichman
May 10 2017 14:58
hi @beniz, i was wondering if you had any knowledge about the tensorflow build inside the deepdetect build process not getting optimized? It prints some messages about optimizations, but we do have CC_OPT_FLAGS="-march=native" set before we do our cmake. From what I can tell from reading on TF's tracker and SO, some of those commands have to make it to the bazel line (e.g. --copt=-march=native, etc.) but may not be. thoughts or ideas?
the output is along the lines of:
W tensorflow/core/platform/cpu_feature_guard.cc:95] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. W tensorflow/core/platform/cpu_feature_guard.cc:95] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
Emmanuel Benazera
@beniz
May 10 2017 15:07
Hi, I've noticed that, I don't know where it comes from, haven't looked at it yet. Have you seen something related around the TF issues ?
this comment refers to a way which seems to work, which may not be exactly the same as the instructions state
Emmanuel Benazera
@beniz
May 10 2017 15:11
try forcing these options into the CMakeLists.txt file
the one at dd root.
Marc Reichman
@marcreichman
May 10 2017 15:11
to be clear, https://github.com/beniz/deepdetect/blob/master/CMakeLists.txt line 99? this is a CPU-only build in this case.
Emmanuel Benazera
@beniz
May 10 2017 15:12
after the -c opt
it's like tf runtimes detects it but their build does not detect or activate it... but more likely it comes from the fact that we are overriding the bazel call in order to build the C++ lib
Marc Reichman
@marcreichman
May 10 2017 15:24
ok, giving it a shot now. doing this in docker so i had to whip up a little patch first. will let you know how it goes
Marc Reichman
@marcreichman
May 10 2017 15:49
@beniz it seems to do the trick
presumably you might have to integrate something to turn CC_OPT_FLAGS into a list of individual --copt arguments but that seems to make it through to the TF runtime
Emmanuel Benazera
@beniz
May 10 2017 15:53
is there any reason to not include the flags with some values by default ? I mean, not the majority does compile TF on arm etc...
if yes, please PR the option that did the job for you
Marc Reichman
@marcreichman
May 10 2017 15:53
in our case i simplified to you, i actually have to use -msse4.2 -msse4.1 -msse3 because some of our distributed platforms don't support avx/avx2, but i'm building on a machine which does
so i updated both places to do so
Emmanuel Benazera
@beniz
May 10 2017 16:01
ok, thanks!