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

前端 未结 12 735
南笙
南笙 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:52

    2.0 COMPATIBLE SOLUTION:

    Execute the below commands in Terminal (Linux/MacOS) or in Command Prompt (Windows) to install Tensorflow 2.0 using Bazel:

    git clone https://github.com/tensorflow/tensorflow.git
    cd tensorflow
    
    #The repo defaults to the master development branch. You can also checkout a release branch to build:
    git checkout r2.0
    
    #Configure the Build => Use the Below line for Windows Machine
    python ./configure.py 
    
    #Configure the Build => Use the Below line for Linux/MacOS Machine
    ./configure
    #This script prompts you for the location of TensorFlow dependencies and asks for additional build configuration options. 
    
    #Build Tensorflow package
    
    #CPU support
    bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package 
    
    #GPU support
    bazel build --config=opt --config=cuda --define=no_tensorflow_py_deps=true //tensorflow/tools/pip_package:build_pip_package
    

提交回复
热议问题