lakshayg / tensorflow-build-archived

TensorFlow binaries supporting AVX, FMA, SSE
1.91k stars 223 forks source link

How can I set cpu support when building tensorflow? #51

Open yuffon opened 5 years ago

yuffon commented 5 years ago

My cpu support avx and avx2, but not avx512f. I build tensorflow myself. And tensorflow works well, but tensorboard still report the following error:

2019-02-04 07:39:40.286677: F tensorflow/core/platform/cpu_feature_guard.cc:37] The TensorFlow library was compiled to use AVX512F instructions, but these aren't available on your machine.

I have two questions.

  1. How can I set cpu feature support when building tensorflow? I think it is configured automatically when building on my platform.
  2. How can I control tensorboard version? tensorboard is collected when installing tensorflow whl file. Is it possible that tensorflow is suitable for my cpu(avx and avx2 but not avx512f) but tensorboard is not suitable for my cpu?
lakshayg commented 5 years ago
  1. TensorFlow is optimized for your CPU by default (-march=native) unless you specify different flags while compiling. If you want to enable only specific features, you can add flags like -mavx, -msse4.1 and similar flags.
  2. I'm not sure about this issue. You can try building tensorboard from source https://github.com/tensorflow/tensorboard
yuffon commented 5 years ago

Yes, I use -march=native in configure. The compiled tensorflow is good, but tensorboard is not.

lakshayg commented 5 years ago

Are you saying that the compiled tensorboard does not work?