rocAL#
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 [rocAL user guide](docs) page.
Documentation
Run the steps below to build documentation locally.
Supported Operations
rocAL can be currently used to perform the following operations either with randomized or fixed parameters:
Blend | Blur (Gaussian 3x3) | Brightness | Color Temperature |
---|---|---|---|
ColorTwist | Contrast | Crop | Crop Mirror Normalization |
CropResize | Exposure Modification | Fisheye Lens | Flip (Horizontal, Vertical and Both) |
Fog | Gamma | Hue | Jitter |
Lens Correction | Pixelization | Raindrops | Random Crop |
Resize | Resize Crop Mirror | Rotation | Salt And Pepper Noise |
Saturation | Snowflakes | Vignette | Warp Affine |
Prerequisites
- Linux distribution
- Ubuntu -
20.04
/22.04
- CentOS -
7
/8
- RedHat -
8
/9
- SLES -
15-SP4
- Ubuntu -
- AMD RPP
- AMD OpenVX™ and AMD OpenVX™ Extensions:
VX_RPP
andAMD Media
- Boost library - Version
1.72
or higher - Turbo JPEG - Version
2.0
or higher - Half-precision floating-point library - Version
1.12.0
or higher - Google Protobuf - Version
3.12.4
or higher - LMBD Library
- RapidJSON
- PyBind11
Build instructions
Prerequisites setup script for Linux - <tt>rocAL-setup.py</tt>
For the convenience of the developer, we here provide the setup script which will install all the dependencies required by this project.
NOTE: This script only needs to be executed once.
Prerequisites for running the script
- Linux distribution
- Ubuntu -
20.04
/22.04
- CentOS -
7
/8
- RedHat -
8
/9
- SLES -
15-SP4
- Ubuntu -
- ROCm supported hardware
-
usage:
Note:
- ROCm upgrade requires the setup script rerun.
Using <tt>rocAL-setup.py</tt>
- Install ROCm
- Use the below commands to set up and build rocAL
- Clone rocAL source code
Note: rocAL supports CPU and two GPU backends: OPENCL/**HIP**:
- Building rocAL with default HIP backend:
- run the setup script to install all the dependencies required ``` python rocAL-setup.py ```
- run the below commands to build rocAL ``` mkdir build-hip cd build-hip cmake ../ make -j8 sudo cmake –build . –target PyPackageInstall 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 commands to install rocAL with OPENCL and HIP backends into two separate custom folders.