tensorflow-build-archived icon indicating copy to clipboard operation
tensorflow-build-archived copied to clipboard

How can I set cpu support when building tensorflow?

Open yuffon opened this issue 6 years ago • 3 comments

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?

yuffon avatar Feb 03 '19 23:02 yuffon

  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

lakshayg avatar Feb 04 '19 00:02 lakshayg

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

yuffon avatar Feb 04 '19 00:02 yuffon

Are you saying that the compiled tensorboard does not work?

lakshayg avatar Feb 04 '19 01:02 lakshayg