1 #!/usr/bin/env bash 2 # Copyright 2018 The TensorFlow Authors. All Rights Reserved. 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 # ============================================================================== 16 17 OPENBLAS_SRC_PATH=/tmp/openblas_src/ 18 POWER="POWER8" 19 USE_OPENMP="USE_OPENMP=1" 20 OPENBLAS_INSTALL_PATH="/usr" 21 apt-get update 22 apt-get install -y gfortran gfortran-5 23 rm -rf ${OPENBLAS_SRC_PATH} 24 git clone -b release-0.3.0 https://github.com/xianyi/OpenBLAS ${OPENBLAS_SRC_PATH} 25 cd ${OPENBLAS_SRC_PATH} 26 # Pick up fix for OpenBLAS issue 1571 27 git cherry-pick -X theirs 961d25e9c7e4a1758adb1dbeaa15187de69dd052 28 make TARGET=${POWER} ${USE_OPENMP} FC=gfortran 29 make PREFIX=${OPENBLAS_INSTALL_PATH} install 30