Skip to content

Commit

Permalink
Documentation - Sphinx DoxyFile Updates (#56)
Browse files Browse the repository at this point in the history
* DoxyFile Updates

* Sphinx - Updates

* Sphinx - Fix

* Sphinx - Updates

* Cleanup

* rocAL - User Guide Updates

* Fix - Readme

* Sphinx - Build fix

* Chapter 3 - Updates

* Update docs/sphinx/_toc.yml.in

* Documentation - updates

* Fix Chapters

* Readme - Updates

* Fix

---------

Co-authored-by: Sam Wu <[email protected]>
  • Loading branch information
kiritigowda and samjwu authored Aug 22, 2023
1 parent a2c1584 commit 0a8992d
Show file tree
Hide file tree
Showing 11 changed files with 345 additions and 164 deletions.
109 changes: 22 additions & 87 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<p align="center"><img width="70%" src="docs/data/rocAL_logo.png" /></p>

The AMD ROCm Augmentation Library (**rocAL**) is designed to efficiently decode and process images and videos from a variety of storage formats and modify them through a processing graph programmable by the user. rocAL currently provides C API.
For more details, go to [docs](docs) page.
For more details, go to [rocAL user guide](docs) page.

## Documentation

Expand Down Expand Up @@ -66,10 +66,10 @@ rocAL can be currently used to perform the following operations either with rand

## Prerequisites


* Linux distribution
+ Ubuntu - `20.04` / `22.04`
+ CentOS - `7` / `8`
+ RedHat - `8` / `9`
+ SLES - `15-SP4`
* [AMD RPP](https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp)
* [AMD OpenVX&trade;](https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/tree/master/amd_openvx) and AMD OpenVX&trade; Extensions: `VX_RPP` and `AMD Media`
Expand All @@ -93,6 +93,9 @@ For the convenience of the developer, we here provide the setup script which wil

* Linux distribution
+ Ubuntu - `20.04` / `22.04`
+ CentOS - `7` / `8`
+ RedHat - `8` / `9`
+ SLES - `15-SP4`
* [ROCm supported hardware](https://docs.amd.com)
* [ROCm](https://docs.amd.com)

Expand All @@ -114,24 +117,26 @@ For the convenience of the developer, we here provide the setup script which wil

### Using `rocAL-setup.py`

* Install [ROCm](https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html)
* Install [ROCm](https://rocmdocs.amd.com/en/latest/deploy/linux/installer/install.html)

* Use the below commands to set up and build rocAL

+ Clone rocAL source code

```
git clone https://github.com/ROCmSoftwarePlatform/rocAL.git
cd rocAL
```
**Note:** rocAL supports **CPU** and two **GPU** backends: **OPENCL**/**HIP**:

**Note:** rocAL has support for two GPU backends: **OPENCL** and **HIP**:
+ Building rocAL with default **HIP** backend:

+ Instructions for building rocAL with the **HIP** GPU backend (i.e., default GPU backend):

+ run the setup script to install all the dependencies required by the **HIP** GPU backend:
+ run the setup script to install all the dependencies required
```
python rocAL-setup.py
```
+ run the below commands to build rocAL with the **HIP** GPU backend:
+ run the below commands to build rocAL
```
mkdir build-hip
cd build-hip
Expand All @@ -140,97 +145,27 @@ For the convenience of the developer, we here provide the setup script which wil
sudo cmake --build . --target PyPackageInstall
sudo make install
```
**Note:** sudo is required to build rocAL_pybind package (only supported on HIP backend)
+ Instructions for building rocAL with **OPENCL** GPU backend:
+ run the setup script to install all the dependencies required by the **OPENCL** GPU backend:
```
python rocAL-setup.py --reinstall yes --backend OCL
```
+ run the below commands to build rocAL with the **OPENCL** GPU backend:
```
mkdir build-ocl
cd build-ocl
cmake -DBACKEND=OPENCL ../
make -j8
sudo make install
```
**Note:** sudo is required to build rocAL_pybind package (only supported on HIP backend)
**Note:**
+ rocAL_pybind is not supported on OPENCL backend
+ rocAL cannot be installed for both GPU backends in the same default folder (i.e., /opt/rocm/)
if an app interested in installing rocAL with both GPU backends, then add **-DCMAKE_INSTALL_PREFIX** in the cmake
+ if an app interested in installing rocAL with both GPU backends, then add **-DCMAKE_INSTALL_PREFIX** in the cmake
commands to install rocAL with OPENCL and HIP backends into two separate custom folders.
### Prerequisites - Manual Install
* [AMD RPP](https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp)
* [AMD OpenVX&trade;](https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/tree/master/amd_openvx) and AMD OpenVX&trade; Extensions: `VX_RPP` and `AMD Media`
* [Boost library](https://www.boost.org) - Version `1.66` or higher
* [Turbo JPEG](https://libjpeg-turbo.org/) - Version `2.0` or higher
* [Half-precision floating-point](https://half.sourceforge.net) library - Version `1.12.0` or higher
* [Google Protobuf](https://developers.google.com/protocol-buffers) - Version `3.11.1` or higher
* [LMBD Library](http://www.lmdb.tech/doc/)
* [RapidJSON](https://github.com/Tencent/rapidjson)
* [PyBind11](https://github.com/pybind/pybind11)
#### Turbo JPEG installation
Turbo JPEG library is a SIMD optimized library which currently rocAL uses to decode input JPEG images. It needs to be built from the source and installed in the default path for libraries and include headers. You can follow the instruction below to download the source, build and install it.
**Note:** install nasm package
```
sudo apt-get install nasm
```
**Note:** You need wget package to download the tar file.
```
sudo apt-get install wget
```
```
git clone -b 2.0.6.2 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
```
#### LMDB installation
```
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
```
#### RapidJSON installation
```
git clone https://github.com/Tencent/rapidjson.git
cd rapidjson && mkdir build && cd build
cmake ../ && make -j$nproc && sudo make install
```
#### PyBind11 installation
```
pip install pytest==7.3.1
git clone -b https://github.com/pybind/pybind11
cd pybind11 && mkdir build && cd build
cmake -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON ../ && make -j4 && sudo make install
```
## Tested Configurations
* Linux distribution
+ Ubuntu - `20.04` / `22.04`
* ROCm: rocm-core - `5.4.0.50400-72`
* RPP - [1.2.0](https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp/releases/tag/1.2.0)
* MIVisionX - [master](https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX)
* Boost - [1.72.0](https://www.boost.org/users/history/version_1_72_0.html)
* Protobuf - [V3.12.4](https://github.com/protocolbuffers/protobuf/releases/tag/v3.12.4)
* OpenCV - [4.6.0](https://github.com/opencv/opencv/releases/tag/4.6.0)
* RPP - [1.2.0](https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp/releases/tag/1.2.0)
* FFMPEG - [n4.4.2](https://github.com/FFmpeg/FFmpeg/releases/tag/n4.4.2)
* MIVisionX - [master](https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX)
* Dependencies for all the above packages
* RapidJSON- [master](https://github.com/Tencent/rapidjson)
* PyBind11 - [v2.10.4](https://github.com/pybind/pybind11)
* CuPy - [master](https://github.com/ROCmSoftwarePlatform/cupy.git)
* rocAL Setup Script - `V1.0.2`
* Dependencies for all the above packages
50 changes: 30 additions & 20 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
# rocAL Introduction
<p align="center"><img width="70%" src="data/rocAL_logo.png" /></p>

# rocAL User Guide

Today’s deep learning applications require loading and pre-processing data efficiently to achieve high processing throughput. This requires creating efficient processing pipelines fully utilizing the underlying hardware capabilities. Some examples are load and decode data, do a variety of augmentations, color-format conversions, etc.
Deep learning frameworks require supporting multiple data formats and augmentations to adapt to a variety of data-sets and models.

AMD ROCm Augmentation Library (rocAL) is designed to efficiently do such processing pipelines from both images and video as well as from a variety of storage formats.
These pipelines are programmable by the user using both C++ and Python APIs.

## User Guide Chapters
- [Chapter 1 - Overview](user_guide/ch1.md)
- [Chapter 2 - Architecture Components](user_guide/ch2.md)
- [Chapter 3 - Installation](user_guide/ch3.md)
- [Chapter 4 - Using with Python API](user_guide/ch4.md)
- [Chapter 5 - Framework Integration](user_guide/ch5.md)
- [Chapter 6 - Using with C++ API](user_guide/ch6.md)

## Key Components of rocAL

* Full processing pipeline support for data_loading, meta-data loading, augmentations, and data-format conversions for training and inference.
Expand All @@ -16,11 +26,11 @@ These pipelines are programmable by the user using both C++ and Python APIs.

## Prerequisites

Refer to [rocAL](https://github.com/ROCmSoftwarePlatform/rocAL) to follow and install pre-requisites.
Refer [rocAL Prerequisites](https://github.com/ROCmSoftwarePlatform/rocAL#prerequisites)

## Build instructions

Follow the build instructions in [rocAL](https://github.com/ROCmSoftwarePlatform/rocAL)
Refer [rocAL build instructions](https://github.com/ROCmSoftwarePlatform/rocAL#build-instructions)

## rocAL Python

Expand All @@ -38,23 +48,23 @@ Follow the build instructions in [rocAL](https://github.com/ROCmSoftwarePlatform
* Contains the image augmentations & file read and decode operations which are linked to rocAL C++ API
* All ops (listed below) are supported for the single input image and batched inputs.

|Image Augmentation | Reader and Decoder | Geometric Ops |
| :------------------: |:--------------------:| :-------------:|
| ColorTwist | File Reader | CropMirrorNormalize |
| Brightness | ImageDecoder | Resize |
| Gamma Correction | ImageDecoderRandomCrop | ResizeCrop |
| Snow | COCOReader | WarpAffine |
| Rain | TFRecordReader | FishEye |
| Blur | | LensCorrection |
| Jitter | | Rotate |
| Hue | | |
| Saturation | | |
| Fog | | |
| Contrast | | |
| Vignette | | |
| SNPNoise | | |
| Pixelate | | |
| Blend | | |
| Image Augmentation | Reader and Decoder | Geometric Ops |
| :----------------: | :--------------------: | :-----------------: |
| ColorTwist | File Reader | CropMirrorNormalize |
| Brightness | ImageDecoder | Resize |
| Gamma Correction | ImageDecoderRandomCrop | ResizeCrop |
| Snow | COCOReader | WarpAffine |
| Rain | TFRecordReader | FishEye |
| Blur | | LensCorrection |
| Jitter | | Rotate |
| Hue | | |
| Saturation | | |
| Fog | | |
| Contrast | | |
| Vignette | | |
| SNPNoise | | |
| Pixelate | | |
| Blend | | |

### amd.rocal.pipeline

Expand Down
Loading

0 comments on commit 0a8992d

Please sign in to comment.