Skip to content
Andrew Chapman edited this page Jul 20, 2017 · 31 revisions

hipBLAS is a thin interface that can be called from hcc or nvcc platforms.

Operating Systems

Linux only.

Platform, hcc or nvcc

hipBLAS is written with HiP so it can run with AMD's ROCM or NVIDIA's CUDA hardware.

Instructions to install and verify installation of ROCm are at ROCM.

Dependencies

CMake 2.8 or later

On Ubuntu you can install cmake, cmake-gui, and ccmake with the following:

sudo apt-get update
sudo apt-get install cmake
sudo apt-get install cmake-gui
sudo apt-get install cmake-curses-gui

rocBLAS

hipBLAS needs to link the rocBLAS static libraries. These can be built with the following instructions. Additional information on rocBLAS is at https://github.com/ROCmSoftwarePlatform/rocBLAS/wiki/Build-rocBLAS-libraries-and-verification-code .

mkdir -p ~/repos && cd ~/repos && \
git clone -b master https://github.com/ROCmSoftwarePlatform/rocBLAS.git && \
mkdir -p ~/repos/rocBLAS/build && cd ~/repos/rocBLAS/build && \
cmake .. -DBUILD_SHARED_LIBS=OFF \
-DCMAKE_PREFIX_PATH=~/repos/rocBLAS/build/library-package \
-DBUILD_CLIENTS_SAMPLES=OFF \
-DHIP_ROOT=/opt/rocm/hip -DCMAKE_CXX_FLAGS=-fPIC && \
make -j`nproc` 

Download

Clone hipBLAS with the following commands: (Here it is assumed you will clone hipBLAS into the directory ~/repos/hipBLAS. You can choose to clone into any directory of your choice.)

mkdir -p ~/repos; cd ~/repos
git clone -b master https://github.com/ROCmSoftwarePlatform/hipBLAS.git

Configure

Configure using cmake with the commands below. Note that it is assumed rocBLAS is installed in the directory ~/repos/rocBLAS-build/library-package. If you have rocBLAS installed in another directory, change -DCMAKE_PREFIX_PATH below to give the directory where rocBLAS is installed.

mkdir -p ~/repos/hipBLAS/build; cd ~/repos/hipBLAS/build
cmake .. \
-DCMAKE_PREFIX_PATH=~/repos/rocBLAS/build/library-package \
-DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm/hipblas \
-DCMAKE_CXX_FLAGS=-fPIC

Build

Build with

cd ~/repos/hipBLAS/build
make VERBOSE=1 2>&1 | tee make.lib.out

Install

Install with the following:

cd ~/repos/hipBLAS/build/library-build
make install

After installing, the library libhipblas-hcc.so will be in the directory ~/repos/hipBLAS-build/library-package/lib. The include file hipblas.h will be in the directory ~/repos/hipBLAS-build/library-package/include.

Build deb and rpm packages

cd ~/repos/hipBLAS-build/library-build
make package

The package file will be in the directory ~/repos/hipBLAS-build/library-build .

Build hipblas

Clone this wiki locally