Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ rpp Public
forked from ROCm/rpp

AMD ROCm Performance Primitives (RPP) library is a comprehensive high-performance computer vision library for AMD processors with HIP/OpenCL/CPU back-ends.

License

Notifications You must be signed in to change notification settings

samjwu/rpp

 
 

Repository files navigation

MIT licensed doc

ROCm Performance Primitives library

AMD ROCm Performance Primitives (RPP) library is a comprehensive, high-performance computer vision library for AMD processors that have HIP, OpenCL, or CPU backends.

The latest RPP release is: GitHub tag (latest SemVer)

Supported functionalities and variants

Supported 3D Functionalities Samples

Input
(nifti1 .nii medical image)
fused_multiply_add_scalar
(brightened 3D image)

Documentation

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

Prerequisites

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.1 and above

    • Ubuntu 20/22

      sudo apt-get install clang
    • CentOS 7

      sudo 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/9

      sudo yum install clang
    • SLES 15-SP4 (use ROCm 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.5 and above

  • IEEE 754-based half-precision floating-point library (half.hpp)

    • Use the half package with ROCm

      sudo 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 17 and above

  • OpenMP

  • Threads

Test suite prerequisites

  • 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
    

Build & Install RPP

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

Test Functionalities

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

Test Functionalities

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 support - OpenVX extension

MIVisionX RPP extension vx_rpp supports RPP functionality through the OpenVX Framework.

Technical support

For RPP questions and feedback, you can contact us at [email protected].

To submit feature requests and bug reports, use our GitHub issues page.

Release notes

All notable changes for each release are added to our changelog.

Tested configurations

  • Linux distribution
    • Ubuntu - 20.04 / 22.04
    • CentOS - 7
    • RedHat - 8 / 9
    • SLES - 15-SP4
  • ROCm: rocm-core - 5.7.0.50700-63
  • OpenCV - 4.6.0

About

AMD ROCm Performance Primitives (RPP) library is a comprehensive high-performance computer vision library for AMD processors with HIP/OpenCL/CPU back-ends.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 96.8%
  • C 2.4%
  • Python 0.4%
  • Shell 0.2%
  • CMake 0.2%
  • Groovy 0.0%