AMD ROCm Performance Primitives (RPP) library is a comprehensive, high-performance computer
vision library for AMD processors that have HIP, OpenCL, or CPU backends.
| Input (nifti1 .nii medical image) |
fused_multiply_add_scalar (brightened 3D image) |
|---|---|
You can build our documentation locally using the following code:
-
Sphinx
cd docs pip3 install -r .sphinx/requirements.txt python3 -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html
-
Doxygen
doxygen .Doxyfile
Refer to our Linux GPU and OS support page to see if your system is supported.
To use RPP, you must have installed the following:
-
ROCm For ROCm installation instructions, see Linux quick-start.
-
Clang Version
5.0.1and above-
Ubuntu
20/22sudo apt-get install clang
-
CentOS
7sudo yum install llvm-toolset-7-clang llvm-toolset-7-clang-analyzer llvm-toolset-7-clang-tools-extra scl enable llvm-toolset-7 bash -
RHEL
8/9sudo yum install clang
-
SLES
15-SP4(useROCm LLVM Clang)zypper -n --no-gpg-checks install clang update-alternatives --install /usr/bin/clang clang /opt/rocm-*/llvm/bin/clang 100 update-alternatives --install /usr/bin/clang++ clang++ /opt/rocm-*/llvm/bin/clang++ 100
-
-
CMake Version
3.5and above -
IEEE 754-based half-precision floating-point library (half.hpp)
-
Use the
halfpackage with ROCmsudo apt-get install half
Note that you must use the correct package management utility (
zypper/yum).- Install from source
wget https://sourceforge.net/projects/half/files/half/1.12.0/half-1.12.0.zip unzip half-1.12.0.zip -d half-files sudo mkdir /usr/local/include/half sudo cp half-files/include/half.hpp /usr/local/include/half
-
-
Compiler with support for C++ Version
17and above -
OpenMP
-
Threads
-
OpenCV
3.4.0/4.5.5-
Install OpenCV prerequisites:
sudo apt-get update sudo -S apt-get -y --allow-unauthenticated install build-essential libgtk2.0-dev libavcodec-dev libavformat-dev libswscale-dev python-dev python-numpy sudo -S apt-get -y --allow-unauthenticated install libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev unzip wget
-
Download OpenCV
3.4.0/4.5.5:wget https://github.com/opencv/opencv/archive/3.4.0.zip unzip 3.4.0.zip cd opencv-3.4.0/OR
wget https://github.com/opencv/opencv/archive/4.5.5.zip unzip 4.5.5.zip cd opencv-4.5.5/ -
Install OpenCV:
mkdir build cd build cmake -D WITH_GTK=ON -D WITH_JPEG=ON -D BUILD_JPEG=ON -D WITH_OPENCL=OFF -D WITH_OPENCLAMDFFT=OFF -D WITH_OPENCLAMDBLAS=OFF -D WITH_VA_INTEL=OFF -D WITH_OPENCL_SVM=OFF -D CMAKE_INSTALL_PREFIX=/usr/local .. sudo -S make -j128 <Or other number of threads to use> sudo -S make install sudo -S ldconfig
-
-
Install TurboJpeg:
sudo apt-get install nasm sudo apt-get install wget git clone -b 2.0.6.1 https://github.com/rrawther/libjpeg-turbo.git cd libjpeg-turbo mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=RELEASE \ -DENABLE_STATIC=FALSE \ -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/libjpeg-turbo-2.0.3 \ -DCMAKE_INSTALL_DEFAULT_LIBDIR=lib \ .. make -j$nproc sudo make install
-
Libsndfile installation
sudo apt-get update sudo apt-get install libsndfile1-dev -
Imagemagick
sudo apt-get install imagemagick -
Nifti-Imaging nifti_clib
git clone [email protected]:NIFTI-Imaging/nifti_clib.git cd nifti_clib mkdir build cd build cmake .. sudo make -j$nproc install
The ROCm Performance Primitives (RPP) library has support for three backends: HIP, OpenCL, and CPU:
- Building RPP with the HIP backend (default):
$ git clone https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp.git
$ mkdir build && cd build
$ cmake -DBACKEND=HIP ../rpp
$ make -j8
$ sudo make install
- Building RPP with the OPENCL backend:
$ git clone https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp.git
$ mkdir build && cd build
$ cmake -DBACKEND=OCL ../rpp
$ make -j8
$ sudo make install
- Building RPP with the CPU backend:
$ git clone https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp.git
$ mkdir build && cd build
$ cmake -DBACKEND=CPU ../rpp
$ make -j8
$ sudo make install
To build and install RPP, run the code shown for your backend:
-
HIP (default)
git clone https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp.git mkdir build && cd build cmake -DBACKEND=HIP ../rpp make -j8 sudo make install
-
OpenCL
git clone https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp.git mkdir build && cd build cmake -DBACKEND=OCL ../rpp make -j8 sudo make install
-
CPU
git clone https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp.git mkdir build && cd build cmake -DBACKEND=CPU ../rpp make -j8 sudo make install
To test the functionalities of RPP, run the code shown for your backend:
-
HIP
cd rpp/utilities/rpp-unittests/HIP_NEW ./testAllScript.sh -
OpenCL
cd rpp/utilities/rpp-unittests/OCL_NEW ./testAllScript.sh- CPU
cd rpp/utilities/rpp-unittests/HOST_NEW ./testAllScript.sh
MIVisionX RPP extension vx_rpp supports RPP functionality through the OpenVX Framework.
For RPP questions and feedback, you can contact us at [email protected].
To submit feature requests and bug reports, use our GitHub issues page.
All notable changes for each release are added to our changelog.
- Linux distribution
- Ubuntu -
20.04/22.04 - CentOS -
7 - RedHat -
8/9 - SLES -
15-SP4
- Ubuntu -
- ROCm: rocm-core -
5.7.0.50700-63 - OpenCV - 4.6.0