How to compile Tensorflow with SSE4.2 and AVX instructions?

前端 未结 12 853
南笙
南笙 2020-11-22 04:14

This is the message received from running a script to check if Tensorflow is working:

I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUD         


        
12条回答
  •  醉梦人生
    2020-11-22 04:40

    These are SIMD vector processing instruction sets.

    Using vector instructions is faster for many tasks; machine learning is such a task.

    Quoting the tensorflow installation docs:

    To be compatible with as wide a range of machines as possible, TensorFlow defaults to only using SSE4.1 SIMD instructions on x86 machines. Most modern PCs and Macs support more advanced instructions, so if you're building a binary that you'll only be running on your own machine, you can enable these by using --copt=-march=native in your bazel build command.

提交回复
热议问题