-1

I am currently using Tensorflow's C API for a project. However during the first inference run I get this message:

Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA

Is there a way to use the C API with AVX or AVX2 support?

tre95
  • 433
  • 5
  • 16
  • You can compile it for your machine: https://stackoverflow.com/questions/41293077/how-to-compile-tensorflow-with-sse4-2-and-avx-instructions – Kampi Jun 12 '19 at 07:18
  • this is not an error, tensorflow is just reminding you that it can do better if it was compiled with different settings. @Kampi 's link can guide you if you really want to compile it yourself. – Mete Han Kahraman Jun 12 '19 at 07:30
  • Possible duplicate of [How to compile Tensorflow with SSE4.2 and AVX instructions?](https://stackoverflow.com/questions/41293077/how-to-compile-tensorflow-with-sse4-2-and-avx-instructions) – E_net4 Jun 12 '19 at 10:18
  • Hi, thanks for your replies. However as I never compiled Tensorflow on my own I have a question regarding this. Using the C API seems to be possible without any installation, I just had to link it (see: https://www.tensorflow.org/install/lang_c), so I did not use bazel, conda, pip or whatever. Is there something precompiled or how would the procedure look like for my case? Would the C API even recognize that I compiled Tensorflow with AVX when it does not require an installation at all? – tre95 Jun 12 '19 at 11:00

1 Answers1

0

Found it out some time ago:

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/lib_package/README.md under C library.

tre95
  • 433
  • 5
  • 16