From 78348a285350425ff3baf782f8f37906e7c6ddc6 Mon Sep 17 00:00:00 2001 From: "nishidha@us.ibm.com" Date: Thu, 11 Aug 2016 14:43:26 +0530 Subject: [PATCH] Added support of IBM's MASS library that optimizes performance on Power architectures --- Makefile.power | 10 ++++++++++ README.md | 29 +++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/Makefile.power b/Makefile.power index 589d674..79db837 100644 --- a/Makefile.power +++ b/Makefile.power @@ -38,6 +38,16 @@ else endif endif +#Either uncomment below line or run make with `USE_MASS=1` to enable support of MASS library +#USE_MASS = 1 + +ifeq ($(USE_MASS), 1) +# Path to MASS libs, change it if the libs are installed at any other location +MASSPATH = /opt/ibm/xlmass/8.1.3/lib +COMMON_OPT += -mveclibabi=mass -ftree-vectorize -funsafe-math-optimizations -DUSE_MASS +EXTRALIB += -L$(MASSPATH) -lmass -lmassvp8 -lmass_simdp8 +endif + ifdef BINARY64 diff --git a/README.md b/README.md index 8ac8884..ff55eda 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,35 @@ On X86 box, compile this library for loongson3a CPU with loongcc (based on Open6 make DEBUG=1 +### Compile with MASS Support on Power CPU (Optional dependency) + +[IBM MASS](http://www-01.ibm.com/software/awdtools/mass/linux/mass-linux.html) library consists of a set of mathematical functions for C, C++, and +Fortran-language applications that are tuned for optimum performance on POWER architectures. OpenBLAS with MASS requires 64-bit, little-endian OS on POWER. +The library can be installed as below - + + * On Ubuntu: + + wget -q http://public.dhe.ibm.com/software/server/POWER/Linux/xl-compiler/eval/ppc64le/ubuntu/public.gpg -O- | sudo apt-key add - + echo "deb http://public.dhe.ibm.com/software/server/POWER/Linux/xl-compiler/eval/ppc64le/ubuntu/ trusty main" | sudo tee /etc/apt/sources.list.d/ibm-xl-compiler-eval.list + sudo apt-get update + sudo apt-get install libxlmass-devel.8.1.3 + + * On RHEL/CentOS: + + wget http://public.dhe.ibm.com/software/server/POWER/Linux/xl-compiler/eval/ppc64le/rhel7/repodata/repomd.xml.key + sudo rpm --import repomd.xml.key + wget http://public.dhe.ibm.com/software/server/POWER/Linux/xl-compiler/eval/ppc64le/rhel7/ibm-xl-compiler-eval.repo + sudo cp ibm-xl-compiler-eval.repo /etc/yum.repos.d/ + sudo yum install libxlmass-devel.8.1.3 + +After installing MASS library, compile openblas with USE_MASS=1. + +Example: + +Compiling on Power8 with MASS support - + + make USE_MASS=1 TARGET=POWER8 + ### Install to the directory (optional) Example: -- 2.7.4