Prepare documentation (#57)
* Updated the readme file to point to the official documentation
* first commit of new documentation structure
* split up and reconfigured Using rocJpeg
* Updated the readme file to point to the official documentation
* first commit of new documentation structure
* split up and reconfigured Using rocJpeg
* fixed missing space
* All changes asked for in the PR except the Destroy Handles part.
* separated creating and destroying handles; added a destroying handles section; added links to hipmalloc() and hipfree()
* removed the installation and build sections so that it doesn't conflict/go out of sync with the official doc
* putting readme back the way it was, minus documentation section
* changed some wording around hipFree()
[ROCm/rocjpeg commit: 31610c7472]
This commit is contained in:
@@ -1,212 +0,0 @@
|
||||
.. meta::
|
||||
:description: Install rocJPEG
|
||||
:keywords: install, rocJPEG, AMD, ROCm
|
||||
|
||||
********************************************************************
|
||||
Installation
|
||||
********************************************************************
|
||||
|
||||
rocJPEG is a high performance JPEG decode SDK for AMD GPUs. Using the rocJPEG API,
|
||||
you can access the JPEG decoding features available on your GPU.
|
||||
|
||||
Prerequisites
|
||||
========================================
|
||||
|
||||
* Linux distribution
|
||||
|
||||
* Ubuntu: 20.04/22.04
|
||||
* RHEL: 8/9
|
||||
* SLES: 15-SP5
|
||||
|
||||
* `ROCm-supported hardware <https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html>`_
|
||||
(``gfx908`` or higher is required)
|
||||
|
||||
* Install ROCm 6.3.0 or later with
|
||||
`amdgpu-install <https://rocm.docs.amd.com/projects/install-on-linux/en/latest/how-to/amdgpu-install.html>`_
|
||||
|
||||
* Run: ``--usecase=rocm``
|
||||
* To install rocJPEG with minimum requirements, follow the :doc:`quick-start instructions <./quick-start>`
|
||||
|
||||
* Video Acceleration API - Version `1.5.0+` - `Libva` is an implementation for VA-API
|
||||
|
||||
.. code:: shell
|
||||
|
||||
sudo apt install libva-dev
|
||||
|
||||
* AMD VA Drivers
|
||||
|
||||
.. code:: shell
|
||||
|
||||
sudo apt install mesa-amdgpu-va-drivers
|
||||
|
||||
* CMake 3.5 or later
|
||||
|
||||
.. code:: shell
|
||||
|
||||
sudo apt install cmake
|
||||
|
||||
* pkg-config
|
||||
|
||||
.. code:: shell
|
||||
|
||||
sudo apt install pkg-config
|
||||
|
||||
* If using Ubuntu 22.04, you must install ``libstdc++-12-dev``
|
||||
|
||||
.. code:: shell
|
||||
|
||||
sudo apt install libstdc++-12-dev
|
||||
|
||||
.. note::
|
||||
|
||||
All package installs are shown with the ``apt`` package manager. Use the appropriate package
|
||||
manager for your operating system.
|
||||
|
||||
Prerequisites setup script
|
||||
----------------------------------------------------------------------------------------------------------
|
||||
|
||||
For your convenience, we provide the setup script,
|
||||
`rocJPEG-setup.py <https://github.com/ROCm/rocJPEG/blob/develop/rocJPEG-setup.py>`_,
|
||||
which installs all required dependencies. Run this script only once.
|
||||
|
||||
.. code:: shell
|
||||
|
||||
python rocJPEG-setup.py --rocm_path [ ROCm Installation Path - optional (default:/opt/rocm)]
|
||||
|
||||
Installation instructions
|
||||
========================================
|
||||
|
||||
To install rocJPEG, you can use :ref:`package-install` or
|
||||
:ref:`source-install`.
|
||||
|
||||
.. _package-install:
|
||||
|
||||
Package install
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
|
||||
To install rocJPEG runtime, development, and test packages, run the line of code for your operating
|
||||
system.
|
||||
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: Ubuntu
|
||||
|
||||
.. code:: shell
|
||||
|
||||
sudo apt install rocjpeg rocjpeg-dev rocjpeg-test
|
||||
|
||||
.. tab-item:: RHEL
|
||||
|
||||
.. code:: shell
|
||||
|
||||
sudo yum install rocjpeg rocjpeg-devel rocjpeg-test
|
||||
|
||||
.. tab-item:: SLES
|
||||
|
||||
.. code:: shell
|
||||
|
||||
sudo zypper install rocjpeg rocjpeg-devel rocjpeg-test
|
||||
|
||||
.. note::
|
||||
|
||||
Package install auto installs all dependencies.
|
||||
|
||||
* Runtime package: ``rocjpeg`` only provides the rocjpeg library ``librocjpeg.so``
|
||||
* Development package: ``rocjpeg-dev``or ``rocjpeg-devel`` provides the library, header files, and samples
|
||||
* Test package: ``rocjpeg-test`` provides CTest to verify installation
|
||||
|
||||
.. _source-install:
|
||||
|
||||
Source install
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
|
||||
To build rocJPEG from source, run:
|
||||
|
||||
.. code:: shell
|
||||
|
||||
git clone https://github.com/ROCm/rocJPEG.git
|
||||
cd rocJPEG
|
||||
mkdir build && cd build
|
||||
cmake ../
|
||||
make -j8
|
||||
sudo make install
|
||||
|
||||
Run tests:
|
||||
|
||||
.. code:: shell
|
||||
|
||||
make test
|
||||
|
||||
To run tests with verbose option, use ``make test ARGS="-VV"``.
|
||||
|
||||
Make package:
|
||||
|
||||
.. code:: shell
|
||||
|
||||
sudo make package
|
||||
|
||||
Verify installation
|
||||
========================================
|
||||
|
||||
The installer copies:
|
||||
|
||||
* Libraries into ``/opt/rocm/lib``
|
||||
* Header files into ``/opt/rocm/include/rocjpeg``
|
||||
* Samples folder into ``/opt/rocm/share/rocjpeg``
|
||||
* Documents folder into ``/opt/rocm/share/doc/rocjpeg``
|
||||
|
||||
To verify your installation using a sample application, run:
|
||||
|
||||
.. code:: shell
|
||||
|
||||
mkdir rocjpeg-sample && cd rocjpeg-sample
|
||||
cmake /opt/rocm/share/rocjpeg/samples/videoDecode/
|
||||
make -j8
|
||||
./jpegdecode -i /opt/rocm/share/rocjpeg/images/
|
||||
|
||||
To verify your installation using the ``rocjpeg-test`` package, run:
|
||||
|
||||
.. code:: shell
|
||||
|
||||
mkdir rocjpeg-test && cd rocjpeg-test
|
||||
cmake /opt/rocm/share/rocjpeg/test/
|
||||
ctest -VV
|
||||
|
||||
This test package installs the CTest module.
|
||||
|
||||
Samples
|
||||
========================================
|
||||
|
||||
You can access samples to decode your JPEG images in our
|
||||
`GitHub repository <https://github.com/ROCm/rocJPEG/tree/develop/samples>`_. Refer to the
|
||||
individual folders to build and run the samples.
|
||||
|
||||
Docker
|
||||
========================================
|
||||
|
||||
You can find rocJPEG Docker containers in our
|
||||
`GitHub repository <https://github.com/ROCm/rocJPEG/tree/develop/docker>`_.
|
||||
|
||||
Hardware capabilities
|
||||
===================================================
|
||||
|
||||
* Supported JPEG chroma subsampling
|
||||
|
||||
* YUV 4:4:4
|
||||
* YUV 4:4:0
|
||||
* YUV 4:2:2
|
||||
* YUV 4:2:0
|
||||
* YUV 4:0:0
|
||||
|
||||
The following table shows the capabilities of the VCN and total number of JPEG cores for each supported GPU
|
||||
architecture.
|
||||
|
||||
.. csv-table::
|
||||
:header: "GPU Architecture", "VCN Generation", "Total number of JPEG cores", "Max width, Max height"
|
||||
|
||||
"gfx908 - MI1xx", "VCN 2.5.0", "2", "4096, 4096"
|
||||
"gfx90a - MI2xx", "VCN 2.6.0", "4", "4096, 4096"
|
||||
"gfx940, gfx942 - MI300A", "VCN 3.0", "24", "16384, 16384"
|
||||
"gfx941, gfx942 - MI300X", "VCN 3.0", "32", "16384, 16384"
|
||||
"gfx1030, gfx1031, gfx1032 - Navi2x", "VCN 3.x", "1", "16384, 16384"
|
||||
"gfx1100, gfx1101, gfx1102 - Navi3x", "VCN 4.0", "1", "16384, 16384"
|
||||
@@ -1,42 +0,0 @@
|
||||
.. meta::
|
||||
:description: Install rocJPEG
|
||||
:keywords: install, rocJPEG, AMD, ROCm
|
||||
|
||||
********************************************************************
|
||||
rocJPEG quick-start installation
|
||||
********************************************************************
|
||||
|
||||
To install the rocJPEG runtime with minimum requirements, follow these steps:
|
||||
|
||||
1. Install core ROCm components (ROCm 6.3.0 or later) using the
|
||||
:doc:`native package manager <rocm-install-on-linux:how-to/native-install/index>`
|
||||
installation instructions.
|
||||
|
||||
* Register repositories
|
||||
* Register kernel-mode driver
|
||||
* Register ROCm packages
|
||||
* Install kernel driver (``amdgpu-dkms``)--only required on bare metal install. Docker runtime uses the
|
||||
base ``dkms`` package irrespective of the version installed.
|
||||
|
||||
2. Install rocJPEG runtime package. rocJPEG only provides the ``librocjpeg.so`` library (the
|
||||
runtime package only installs the required core dependencies).
|
||||
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: Ubuntu
|
||||
|
||||
.. code:: shell
|
||||
|
||||
sudo apt install rocjpeg
|
||||
|
||||
.. tab-item:: RHEL
|
||||
|
||||
.. code:: shell
|
||||
|
||||
sudo yum install rocjpeg
|
||||
|
||||
.. tab-item:: SLES
|
||||
|
||||
.. code:: shell
|
||||
|
||||
sudo zypper install rocjpeg
|
||||
@@ -0,0 +1,42 @@
|
||||
.. meta::
|
||||
:description: Install rocJPEG with the source code
|
||||
:keywords: install, building, rocJPEG, AMD, ROCm, source code, developer
|
||||
|
||||
********************************************************************
|
||||
Building and installing rocJPEG from source code
|
||||
********************************************************************
|
||||
|
||||
These instructions are for building rocJPEG from its source code. If you will not be contributing to the rocJPEG code base or previewing features, `package installers <https://rocm.docs.amd.com/projects/rocJPEG/en/latest/install/rocjpeg-package-install.html>`_ are available.
|
||||
|
||||
.. note::
|
||||
|
||||
ROCm 6.3.0 or later must be installed before installing rocJPEG. See `Quick start installation guide <https://rocm.docs.amd.com/projects/install-on-linux/en/latest/install/quick-start.html>`_ for detailed ROCm installation instructions.
|
||||
|
||||
Use `rocJPEG-setup.py <https://github.com/ROCm/rocJPEG/blob/develop/rocJPEG-setup.py>`_ available from the rocJPEG GitHub repo to install the prerequisites:
|
||||
|
||||
.. code:: shell
|
||||
|
||||
python rocJPEG-setup.py --rocm_path [ ROCm Installation Path - optional (default:/opt/rocm)]
|
||||
|
||||
Build and install rocJPEG using the following commands:
|
||||
|
||||
.. code:: shell
|
||||
|
||||
git clone https://github.com/ROCm/rocJPEG.git
|
||||
cd rocJPEG
|
||||
mkdir build && cd build
|
||||
cmake ../
|
||||
make -j8
|
||||
sudo make install
|
||||
|
||||
After installation, the rocJPEG libraries will be copied to ``/opt/rocm/lib`` and the rocJPEG header files will be copied to ``/opt/rocm/include/rocjpeg``.
|
||||
|
||||
Install the CTest module:
|
||||
|
||||
.. code:: shell
|
||||
|
||||
mkdir rocjpeg-test && cd rocjpeg-test
|
||||
cmake /opt/rocm/share/rocjpeg/test/
|
||||
ctest -VV
|
||||
|
||||
To test your build, run ``make test``. To run the test with the verbose option, run ``make test ARGS=\"-VV\"``.
|
||||
@@ -0,0 +1,74 @@
|
||||
.. meta::
|
||||
:description: Installing rocJPEG with the package installer
|
||||
:keywords: install, rocJPEG, AMD, ROCm, basic, development, package
|
||||
|
||||
********************************************************************
|
||||
Installing rocJPEG with the package installer
|
||||
********************************************************************
|
||||
|
||||
.. note::
|
||||
|
||||
ROCm 6.3.0 or later must be installed before installing rocJPEG. See `Quick start installation guide <https://rocm.docs.amd.com/projects/install-on-linux/en/latest/install/quick-start.html>`_ for detailed ROCm installation instructions.
|
||||
|
||||
There are three rocJPEG packages available:
|
||||
|
||||
* ``rocjpeg``: The rocJPEG runtime package. This is the basic rocJPEG package.
|
||||
* ``rocjpeg-dev``: The rocJPEG development package. This package installs a full suite of libraries, header files, and samples for contributing to the rocJPEG code base.
|
||||
* ``rocjpeg-test``: A test package that provides a CTest to verify the installation.
|
||||
|
||||
Developers who want to contribute to the rocJPEG code base must install both ``rocjpeg-dev`` and ``rocjpeg-test`` in addition to ``rocjpeg``.
|
||||
|
||||
All the required prerequisites are installed when the package installation method is used.
|
||||
|
||||
Basic installation
|
||||
========================================
|
||||
|
||||
Use the following commands to install only the rocJPEG runtime package:
|
||||
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: Ubuntu
|
||||
|
||||
.. code:: shell
|
||||
|
||||
sudo apt install rocjpeg
|
||||
|
||||
.. tab-item:: RHEL
|
||||
|
||||
.. code:: shell
|
||||
|
||||
sudo yum install rocjpeg
|
||||
|
||||
.. tab-item:: SLES
|
||||
|
||||
.. code:: shell
|
||||
|
||||
sudo zypper install rocjpeg
|
||||
|
||||
|
||||
Developer installation
|
||||
========================================
|
||||
|
||||
All three rocJPEG packages, ``rocjpeg``, ``rocjpeg-dev``, and ``rocjpeg-test`` must be installed to develop for rocJPEG.
|
||||
|
||||
Use the following commands to install ``rocjpeg``, ``rocjpeg-dev``, and ``rocjpeg-test``:
|
||||
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: Ubuntu
|
||||
|
||||
.. code:: shell
|
||||
|
||||
sudo apt install rocjpeg rocjpeg-dev rocjpeg-test
|
||||
|
||||
.. tab-item:: RHEL
|
||||
|
||||
.. code:: shell
|
||||
|
||||
sudo yum install rocjpeg rocjpeg-devel rocjpeg-test
|
||||
|
||||
.. tab-item:: SLES
|
||||
|
||||
.. code:: shell
|
||||
|
||||
sudo zypper install rocjpeg rocjpeg-devel rocjpeg-test
|
||||
@@ -0,0 +1,25 @@
|
||||
.. meta::
|
||||
:description: rocJPEG Installation Prerequisites
|
||||
:keywords: install, rocJPEG, AMD, ROCm, prerequisites, dependencies, requirements
|
||||
|
||||
********************************************************************
|
||||
rocJPEG prerequisites
|
||||
********************************************************************
|
||||
|
||||
rocJPEG requires ROCm 6.3 or later running on `accelerators based on the CDNA architecture <https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html>`_.
|
||||
|
||||
ROCm 6.3.0 or later must be installed before installing rocJPEG. See `Quick start installation guide <https://rocm.docs.amd.com/projects/install-on-linux/en/latest/install/quick-start.html>`_ for detailed ROCm installation instructions.
|
||||
|
||||
rocJPEG can be installed on the following Linux environments:
|
||||
|
||||
* Ubuntu 20.04, 22.04, 24.04
|
||||
* RHEL 8 or 9
|
||||
* SLES: 15-SP5
|
||||
|
||||
The following prerequisites are installed by the package installer. If you are building and installing using the source code, use the `rocJPEG-setup.py <https://github.com/ROCm/rocJPEG/blob/develop/rocJPEG-setup.py>`_ setup script available in the rocJPEG GitHub repository to install these prerequisites.
|
||||
|
||||
* Libva, an implementation for Video Acceleration API (VA-API), version 2.16 or later
|
||||
* AMD VA Drivers
|
||||
* CMake version 3.5 or later
|
||||
* pkg-config
|
||||
* libstdc++-12-dev for installations on Ubuntu 22.04
|
||||
Reference in New Issue
Block a user