Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package - Remove rocdecode dependency #208

Merged
merged 4 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .github/workflows/linting.yml

This file was deleted.

70 changes: 55 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,52 @@

[rocAL Documentation](https://github.com/ROCm/rocAL)

## rocAL 2.0.0 (unreleased)
## rocAL 2.1.0 (unreleased)

### Added
### Changes
* Setup: rocdecode install disabled
* Package: rocdecode dependency removed

* Packages - dev & tests
### Removals
* TBA

### Optimizations
* TBA

### Resolved issues
* TBA

### Known issues
* Package install requires `OpenCV` manual install
* CentOS/RedHat/SLES requires `FFMPEG Dev` package manual install
* Hardware decode requires rocm usecase `graphics`

### Upcoming changes
* Optimized audio augmentations support

### Tested Configurations

* Linux distribution
* Ubuntu - `20.04` / `22.04`
* CentOS - `7`
* RedHat - `8` / `9`
* SLES - `15-SP5`
* ROCm: rocm-core - `6.3.0.60300`
* RPP - `rpp` & `rpp-dev`/`rpp-devel`
* MIVisionX - `mivisionx` & `mivisionx-dev`/`mivisionx-devel`
* Protobuf - `libprotobuf-dev`/`protobuf-devel`
* RapidJSON - `https://github.com/Tencent/rapidjson`
* Turbo JPEG - [Version 3.0.2](https://libjpeg-turbo.org/)
* PyBind11 - [v2.11.1](https://github.com/pybind/pybind11)
* FFMPEG - `ffmpeg 4` dev package
* OpenCV - `libopencv` / [4.6.0](https://github.com/opencv/opencv/releases/tag/4.6.0)
* libsndfile - [1.0.31](https://github.com/libsndfile/libsndfile/releases/tag/1.0.31)
* rocAL Setup Script - `V2.5.0`
* Dependencies for all the above packages

## rocAL 2.0.0

### Changes
* Support for audio loader and decoder, which uses libsndfile library to decode wav files
* C++ rocAL audio unit test and python script to run and compare the outputs
* Python support for audio decoders
Expand All @@ -21,7 +62,7 @@
* Support for reading from file lists in file reader
* Support for Audio augmentation - Spectrogram
* Support for Audio augmentation - ToDecibels
* Support for downmixing audio channels during decoding
* Support for down-mixing audio channels during decoding
* Support for Audio augmentation - Resample
* Support for TensorTensorAdd and TensorScalarMultiply operations
* Support for Uniform and Normal distribution nodes
Expand All @@ -30,47 +71,46 @@
* Support for generic augmentation - Normalize
* Support for Audio augmentation - MelFilterBank

### Removals
* VX Image processing deprecated

### Optimizations

* Packages - dev & tests
* Tests
* Setup Script
* CentOS 7 support
* SLES 15 SP5 support

### Changed

* Image to tensor updates
* ROCm install - use case graphics removed

### Fixed

### Resolved issues
* Tests & readme

### Known issues
* Requires custom dependencies installed

### Tested Configurations

* Linux distribution
* Ubuntu - `20.04` / `22.04`
* CentOS - `7`
* RedHat - `8` / `9`
* SLES - `15-SP5`
* ROCm: rocm-core - `6.1.0.60100-64`
* ROCm: rocm-core - `6.2.0.60200`
* RPP - `rpp` & `rpp-dev`/`rpp-devel`
* MIVisionX - `mivisionx` & `mivisionx-dev`/`mivisionx-devel`
* rocDecode - `rocdecode` & `rocdecode-dev`/`rocdecode-devel`
* Protobuf - `libprotobuf-dev`/`protobuf-devel`
* RapidJSON - `https://github.com/Tencent/rapidjson`
* Turbo JPEG - [Version 3.0.2](https://libjpeg-turbo.org/)
* PyBind11 - [v2.11.1](https://github.com/pybind/pybind11)
* FFMPEG - `ffmpeg 4` dev package
* OpenCV - `libopencv` / [4.6.0](https://github.com/opencv/opencv/releases/tag/4.6.0)
* libsndfile - [1.0.31](https://github.com/libsndfile/libsndfile/releases/tag/1.0.31)
* rocAL Setup Script - `V2.5.0`
* rocAL Setup Script - `V2.6.0`
* Dependencies for all the above packages

### Known issues

* Requires custom deps install

## rocAL 1.0.0

### Added
Expand Down
22 changes: 11 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
cmake_minimum_required(VERSION 3.5)
set(VERSION "2.0.0")
set(VERSION "2.1.0")

# Set Project Version and Language
project(rocal VERSION ${VERSION} LANGUAGES CXX)
Expand Down Expand Up @@ -203,16 +203,16 @@ set(ROCAL_DEBIAN_DEV_PACKAGE_LIST "rpp-dev, mivisionx-dev, liblmdb-dev, libprot
set(ROCAL_RPM_DEV_PACKAGE_LIST "rpp-devel, mivisionx-devel, lmdb-devel, protobuf-devel")

# Add rocDecode Deps for HW Decode - Exclude centos-7
if (EXISTS "/etc/os-release")
file(READ "/etc/os-release" OS_RELEASE)
string(REGEX MATCH "CentOS-7" CENTOS_7_FOUND ${OS_RELEASE})
if(NOT CENTOS_7_FOUND)
set(ROCAL_DEBIAN_PACKAGE_LIST "${ROCAL_DEBIAN_PACKAGE_LIST}, rocdecode")
set(ROCAL_RPM_PACKAGE_LIST "${ROCAL_RPM_PACKAGE_LIST}, rocdecode")
set(ROCAL_DEBIAN_DEV_PACKAGE_LIST "${ROCAL_DEBIAN_DEV_PACKAGE_LIST}, rocdecode-dev")
set(ROCAL_RPM_DEV_PACKAGE_LIST "${ROCAL_RPM_DEV_PACKAGE_LIST}, rocdecode-devel")
endif()
endif()
#if (EXISTS "/etc/os-release")
#file(READ "/etc/os-release" OS_RELEASE)
#string(REGEX MATCH "CentOS-7" CENTOS_7_FOUND ${OS_RELEASE})
#if(NOT CENTOS_7_FOUND)
#set(ROCAL_DEBIAN_PACKAGE_LIST "${ROCAL_DEBIAN_PACKAGE_LIST}, rocdecode")
#set(ROCAL_RPM_PACKAGE_LIST "${ROCAL_RPM_PACKAGE_LIST}, rocdecode")
#set(ROCAL_DEBIAN_DEV_PACKAGE_LIST "${ROCAL_DEBIAN_DEV_PACKAGE_LIST}, rocdecode-dev")
#set(ROCAL_RPM_DEV_PACKAGE_LIST "${ROCAL_RPM_DEV_PACKAGE_LIST}, rocdecode-devel")
#endif()
#endif()

# '%{?dist}' breaks manual builds on debian systems due to empty Provides
execute_process(
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,12 @@ Review all notable [changes](CHANGELOG.md#changelog) with the latest release
* ROCm: rocm-core - `6.1.0.60100-64`
* RPP - `rpp` & `rpp-dev`/`rpp-devel`
* MIVisionX - `mivisionx` & `mivisionx-dev`/`mivisionx-devel`
* rocDecode - `rocdecode` & `rocdecode-dev`/`rocdecode-devel`
* Protobuf - `libprotobuf-dev`/`protobuf-devel`
* RapidJSON - `https://github.com/Tencent/rapidjson`
* Turbo JPEG - [Version 3.0.2](https://libjpeg-turbo.org/)
* PyBind11 - [v2.11.1](https://github.com/pybind/pybind11)
* FFMPEG - `ffmpeg` dev package
* OpenCV - `libopencv-dev` / [4.6.0](https://github.com/opencv/opencv/releases/tag/4.6.0)
* libsndfile - [1.0.31](https://github.com/libsndfile/libsndfile/releases/tag/1.0.31)
* rocAL Setup Script - `V2.5.0`
* rocAL Setup Script - `V2.6.0`
* Dependencies for all the above packages
43 changes: 30 additions & 13 deletions rocAL-setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

__copyright__ = "Copyright 2022 - 2024, AMD ROCm Augmentation Library"
__license__ = "MIT"
__version__ = "2.5.0"
__version__ = "2.6.0"
__email__ = "mivisionx.support@amd.com"
__status__ = "Shipping"

Expand Down Expand Up @@ -136,9 +136,11 @@ def ERROR_CHECK(call):
linuxSystemInstall_check = ''
linuxFlag = ''
sudoValidate = 'sudo -v'
osUpdate = ''
if "centos" in os_info_data or "redhat" in os_info_data or "Oracle" in os_info_data:
linuxSystemInstall = 'yum -y'
linuxSystemInstall_check = '--nogpgcheck'
osUpdate = 'makecache'
if "VERSION_ID=7" in os_info_data:
linuxCMake = 'cmake3'
sudoValidate = 'sudo -k'
Expand All @@ -153,6 +155,7 @@ def ERROR_CHECK(call):
linuxSystemInstall = 'apt-get -y'
linuxSystemInstall_check = '--allow-unauthenticated'
linuxFlag = '-S'
osUpdate = 'update'
if "VERSION_ID=20" in os_info_data:
platfromInfo = platfromInfo+'-Ubuntu-20'
elif "VERSION_ID=22" in os_info_data:
Expand All @@ -165,10 +168,12 @@ def ERROR_CHECK(call):
linuxSystemInstall = 'zypper -n'
linuxSystemInstall_check = '--no-gpg-checks'
platfromInfo = platfromInfo+'-SLES'
osUpdate = 'refresh'
elif "Mariner" in os_info_data:
linuxSystemInstall = 'tdnf -y'
linuxSystemInstall_check = '--nogpgcheck'
platfromInfo = platfromInfo+'-Mariner'
osUpdate = 'makecache'
else:
print("\nrocAL Setup on "+platfromInfo+" is unsupported\n")
print("\nrocAL Setup Supported on: Ubuntu 20/22, RedHat 8/9, & SLES 15\n")
Expand All @@ -178,7 +183,7 @@ def ERROR_CHECK(call):
print("\nrocAL Setup on: "+platfromInfo+"\n")

if userName == 'root':
ERROR_CHECK(os.system(linuxSystemInstall+' update'))
ERROR_CHECK(os.system(linuxSystemInstall+' '+osUpdate))
ERROR_CHECK(os.system(linuxSystemInstall+' install sudo'))

# Delete previous install
Expand Down Expand Up @@ -311,7 +316,7 @@ def ERROR_CHECK(call):
# Create Build folder
ERROR_CHECK(os.system('(cd '+deps_dir+'; mkdir build )'))
# update
ERROR_CHECK(os.system('sudo '+linuxFlag+' '+linuxSystemInstall +' '+linuxSystemInstall_check+' update'))
ERROR_CHECK(os.system('sudo '+linuxFlag+' '+linuxSystemInstall +' '+linuxSystemInstall_check+' '+osUpdate))
# common packages
for i in range(len(commonPackages)):
ERROR_CHECK(os.system('sudo '+linuxFlag+' '+linuxSystemInstall +
Expand All @@ -330,15 +335,15 @@ def ERROR_CHECK(call):
ERROR_CHECK(os.system('sudo '+linuxFlag+' '+linuxSystemInstall +
' '+linuxSystemInstall_check+' install -y '+ rocmRPMPackages[i]))

# rocDecode
if "Ubuntu" in platfromInfo:
for i in range(len(rocdecodeDebianPackages)):
ERROR_CHECK(os.system('sudo '+linuxFlag+' '+linuxSystemInstall +
' '+linuxSystemInstall_check+' install -y '+ rocdecodeDebianPackages[i]))
elif "redhat-7" not in platfromInfo:
for i in range(len(rocdecodeRPMPackages)):
ERROR_CHECK(os.system('sudo '+linuxFlag+' '+linuxSystemInstall +
' '+linuxSystemInstall_check+' install -y '+ rocdecodeRPMPackages[i]))
# rocDecode - TBD: Revert when rocDecode is fully supported on all OS
# if "Ubuntu" in platfromInfo:
# for i in range(len(rocdecodeDebianPackages)):
# ERROR_CHECK(os.system('sudo '+linuxFlag+' '+linuxSystemInstall +
# ' '+linuxSystemInstall_check+' install -y '+ rocdecodeDebianPackages[i]))
# elif "redhat-7" not in platfromInfo:
#for i in range(len(rocdecodeRPMPackages)):
# ERROR_CHECK(os.system('sudo '+linuxFlag+' '+linuxSystemInstall +
# ' '+linuxSystemInstall_check+' install -y '+ rocdecodeRPMPackages[i]))

ERROR_CHECK(os.system(sudoValidate))
# rocAL Core Packages
Expand Down Expand Up @@ -429,7 +434,19 @@ def ERROR_CHECK(call):
'(cd '+deps_dir+'; wget https://github.com/opencv/opencv/archive/'+opencvVersion+'.zip )'))
ERROR_CHECK(os.system('(cd '+deps_dir+'; unzip '+opencvVersion+'.zip )'))
ERROR_CHECK(os.system('(cd '+deps_dir+'/build/OpenCV; '+linuxCMake +
' -D WITH_EIGEN=OFF -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 ../../opencv-'+opencvVersion+' )'))
' -D WITH_EIGEN=OFF \
-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 \
-D BUILD_LIST=core,features2d,highgui,imgcodecs,imgproc,photo,video,videoio \
-D CMAKE_PLATFORM_NO_VERSIONED_SONAME=ON \
../../opencv-'+opencvVersion+' )'))
ERROR_CHECK(os.system('(cd '+deps_dir+'/build/OpenCV; make -j$(nproc))'))
ERROR_CHECK(os.system(sudoValidate))
ERROR_CHECK(os.system('(cd '+deps_dir+'/build/OpenCV; sudo make install)'))
Expand Down