tensorflow: Compile tensorflow with compile option "-xMIC-AVX512" does not work

Hi, All

I want to use AVX512 with tensorflow because vectorization can increase performance. In addition, building any program with icpc(Intel compiler) and compile option “-xMIC-AVX512” can vectorize automatically in state-of-art Intel machine. So, I use the command as below:

CC=icpc bazel build -c opt --copt=-xMIC-AVX512 //tensorflow/tools/pip_package:build_pip_package

But when I type the command, build does not work.

What related GitHub issues or StackOverflow threads have you found by searching the web for your problem?

  • Nothing exist related my issue in GitHub or StackOverflow

Environment info

  • Operating System: Centos 7.2.1511
  • Tensorflow version: r0.10.0 source code version
  • Only use CPU

What other attempted solutions have you tried?

As far as I know, linear algebra library for Tensorflow is “Eigen library” and SIMD vectorizations(like SSE, AVX, etc.) are applied to the Eigen library. So, I changed Eigen source code to apply the AVX512 and gcc compile option “-mavx512f” referring two links(eigen bug report, Benoit Steiner’s Bitbucket), but I didn’t apply AVX512 because there was little information about that.

If someone know the method about applying AVX512 or the date to release Eigen version with AVX512, please tell me about that.

Thank you very much.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 1
  • Comments: 40 (15 by maintainers)

Most upvoted comments

Support for AVX512 in TensorFlow is still a work in progress. I’ll link to the relevant code changes as we make them to keep everyone updated.

@drpngx @benoitsteiner Could you please let me know the exact command to build TensorFlow on Intel x86 platform (Ubuntu 16.04/18.04) with avx/avx2 and avx512 support? And which gcc is required?

I’ve just checked that bazel build --copt=-march=skylake //tensorflow/tools/pip_package:build_pip_package now works with gcc 6.2 with the latest version of the codebase.