Created
February 21, 2018 22:26
-
-
Save ravi9/69d3ccb75a38080a37178b51ca1618b1 to your computer and use it in GitHub Desktop.
Build and Install instructions for Intel Tensorflow 1.5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
#Preferred GCC version > 5 | |
## | |
#Install Bazel | |
# Bazel install intructions on CentOS | |
#Get the latest Bazel: https://github.com/bazelbuild/bazel/releases | |
wget https://github.com/bazelbuild/bazel/releases/download/0.9.0/bazel-0.9.0-installer-linux-x86_64.sh | |
chmod 755 bazel-0.9.0-installer-linux-x86_64.sh | |
sudo ./bazel-0.9.0-installer-linux-x86_64.sh | |
# UBUNTU Bazel installation | |
# sudo apt-get install openjdk-8-jdk | |
# sudo add-apt-repository ppa:webupd8team/java | |
# sudo apt-get update && sudo apt-get install oracle-java8-installer | |
# echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list | |
# curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add - | |
# sudo apt-get update && sudo apt-get install bazel | |
#Git Clone tensorflow r1.5 branch | |
git clone -b r1.5 https://github.com/tensorflow/tensorflow.git | |
cd tensorflow | |
./configure #Choose default options, select no for google cloud platform, S3, etc | |
bazel build --config mkl -c opt //tensorflow/tools/pip_package:build_pip_package | |
mkdir ../tf_whls | |
bazel-bin/tensorflow/tools/pip_package/build_pip_package ../tf_whls/ | |
pip install --upgrade --user ../tf_whls/<tensorflow-wheel-name>.whl | |
#### | |
#RUN sample benchmark | |
#### | |
cd ~ | |
git clone -b mkl_experiment https://github.com/tensorflow/benchmarks.git | |
cd benchmarks/scripts/tf_cnn_benchmarks/ | |
##Example run on a 16-core machine | |
export num_cpus=16 | |
#Export KMP settings | |
export KMP_AFFINITY=granularity=fine,verbose,compact,1,0 | |
export KMP_BLOCKTIME=1 | |
export KMP_SETTINGS=1 | |
export OMP_NUM_THREADS=$num_cpus | |
export OMP_PROC_BIND=true | |
python tf_cnn_benchmarks.py --device cpu --data_format NCHW --cpu skl --data_name synthetic \ | |
--model googlenet --batch_size 64 --num_intra_threads $num_cpus --num_inter_threads 1 \ | |
--num_omp_threads $num_cpus --num_batches 100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment