Skip to content

Commit

Permalink
ROCm - 6.4 updates (#1466)
Browse files Browse the repository at this point in the history
* ROCm - 6.4 updates

* Readme - cleanup

* Setup - Updates

* Docs - Updates
  • Loading branch information
kiritigowda authored Dec 11, 2024
1 parent d5d6bb7 commit c267dcb
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 72 deletions.
10 changes: 6 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ The full documentation for MIVisionX is available at [https://rocm.docs.amd.com/
* Setup: rocdecode install disabled
* Package: rocdecode dependency removed

### Optimizations

* Setup: only core dependency packages installed

### Known issues

* Package installation requires the manual installation of OpenCV.
* Installation on CentOS/RedHat/SLES requires the manual installation of the `FFMPEG Dev` package.
* Hardware decode requires the ROCm `graphics` usecase.
* MIVisionX package installation on RedHat/SLES requires the manual installation of the `OpenCV` and `FFMPEG` development package.

### Upcoming changes

Expand Down Expand Up @@ -66,7 +68,7 @@ The full documentation for MIVisionX is available at [https://rocm.docs.amd.com/
### Known issues

* Package install requires manually installing OpenCV
* Installationon CentOS/RedHat/SLES requires manually installing the `FFMPEG Dev` package
* Installation CentOS/RedHat/SLES requires manually installing the `FFMPEG Dev` package
* Hardware decode requires the ROCm `graphics` usecase.

### Upcoming changes
Expand Down
20 changes: 9 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -230,19 +230,17 @@ endif()
set(MIVISIONX_RUNTIME_PACKAGE_LIST "rocm-hip-runtime, rpp, rocblas, miopen-hip, migraphx")

# Set the dev dependent packages
set(MIVISIONX_DEBIAN_DEV_PACKAGE_LIST "half, rocm-hip-runtime-dev, rpp-dev, rocblas-dev, miopen-hip-dev, migraphx-dev, libavcodec-dev, libavformat-dev, libavutil-dev, libswscale-dev, libopencv-dev")
# TBD - Some RPM packages need Fusion Packages - ffmpeg, libavcodec-devel, libavformat-devel, libavutil-devel, libswscale-devel, libopencv
set(MIVISIONX_RPM_DEV_PACKAGE_LIST "half, rocm-hip-runtime-devel, rpp-devel, rocblas-devel, miopen-hip-devel, migraphx-devel")
set(MIVISIONX_DEBIAN_DEV_PACKAGE_LIST "half, rocm-hip-runtime-dev, rpp-dev, rocblas-dev, miopen-hip-dev, migraphx-dev, pkg-config, libavcodec-dev, libavformat-dev, libavutil-dev, libswscale-dev, libopencv-dev, libomp-dev")
# TBD - Some RPM packages need Fusion Packages - libavcodec-devel, libavformat-devel, libavutil-devel, libswscale-devel, libopencv
set(MIVISIONX_RPM_DEV_PACKAGE_LIST "half, rocm-hip-runtime-devel, rpp-devel, rocblas-devel, miopen-hip-devel, migraphx-devel, pkg-config, libomp-devel")

# Add rocDecode Deps - Exclude centos-7
if (EXISTS "/etc/os-release")
# Add OS specific dependencies
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) - Disable TBD: Turn on with package update
#set(MIVISIONX_RUNTIME_PACKAGE_LIST "${MIVISIONX_RUNTIME_PACKAGE_LIST}, rocdecode")
#set(MIVISIONX_DEBIAN_DEV_PACKAGE_LIST "${MIVISIONX_DEBIAN_DEV_PACKAGE_LIST}, rocdecode-dev")
#set(MIVISIONX_RPM_DEV_PACKAGE_LIST "${MIVISIONX_RPM_DEV_PACKAGE_LIST}, rocdecode-devel")
#endif()
string(REGEX MATCH "22.04" UBUNTU_22_FOUND ${OS_RELEASE})
if(UBUNTU_22_FOUND)
set(MIVISIONX_DEBIAN_DEV_PACKAGE_LIST "${MIVISIONX_DEBIAN_DEV_PACKAGE_LIST}, libstdc++-12-dev")
endif()
endif()

# '%{?dist}' breaks manual builds on debian systems due to empty Provides
Expand Down
34 changes: 13 additions & 21 deletions MIVisionX-setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

__copyright__ = "Copyright 2018 - 2024, AMD ROCm MIVisionX"
__license__ = "MIT"
__version__ = "3.8.0"
__version__ = "3.8.1"
__email__ = "[email protected]"
__status__ = "Shipping"

Expand Down Expand Up @@ -250,9 +250,7 @@ def ERROR_CHECK(waitval):

inferenceDebianPackages = [
'python3-dev',
'python3-pip',
'protobuf-compiler',
'libprotoc-dev'
'python3-pip'
]

neuralNetRPMPackages = [
Expand All @@ -262,14 +260,9 @@ def ERROR_CHECK(waitval):
'migraphx-devel'
]

libPythonProto = "python3-protobuf"
if "centos" in os_info_data and "VERSION_ID=7" in os_info_data:
libPythonProto = "protobuf-python"
inferenceRPMPackages = [
'python3-devel',
'python3-pip',
'protobuf-devel',
str(libPythonProto)
'python3-pip'
]

pipNumpyVersion = "numpy==1.23.0"
Expand Down Expand Up @@ -311,7 +304,6 @@ def ERROR_CHECK(waitval):
]

ffmpegDebianPackages = [
'ffmpeg',
'libavcodec-dev',
'libavformat-dev',
'libavutil-dev',
Expand Down Expand Up @@ -347,8 +339,7 @@ def ERROR_CHECK(waitval):
'libjpeg-devel',
'libpng-devel',
'libtiff-devel',
'libavc1394',
'unzip'
'libavc1394'
]

# update
Expand Down Expand Up @@ -456,14 +447,15 @@ def ERROR_CHECK(waitval):
# Install base Deps
for i in range(len(pip3InferencePackagesRPM)):
ERROR_CHECK(os.system('pip3 install '+ pip3InferencePackagesRPM[i]))
if "SLES" in platfromInfo or "Mariner" in platfromInfo or "redhat-8" in platfromInfo:
ERROR_CHECK(os.system('mkdir -p '+modelCompilerDeps+'/nnef-deps'))
ERROR_CHECK(os.system(
'(cd '+modelCompilerDeps+'/nnef-deps; git clone -b nnef-v1.0.0 https://github.com/KhronosGroup/NNEF-Tools.git)'))
ERROR_CHECK(os.system(
'(cd '+modelCompilerDeps+'/nnef-deps/NNEF-Tools/parser/cpp; mkdir -p build && cd build; '+linuxCMake+' ..; make -j$(nproc); sudo make install)'))
ERROR_CHECK(os.system(
'(cd '+modelCompilerDeps+'/nnef-deps/NNEF-Tools/parser/python; sudo python3 setup.py install)'))
# NNEF Manual Install
if "SLES" in platfromInfo or "Mariner" in platfromInfo or "redhat-8" in platfromInfo:
ERROR_CHECK(os.system('mkdir -p '+modelCompilerDeps+'/nnef-deps'))
ERROR_CHECK(os.system(
'(cd '+modelCompilerDeps+'/nnef-deps; git clone -b nnef-v1.0.0 https://github.com/KhronosGroup/NNEF-Tools.git)'))
ERROR_CHECK(os.system(
'(cd '+modelCompilerDeps+'/nnef-deps/NNEF-Tools/parser/cpp; mkdir -p build && cd build; '+linuxCMake+' ..; make -j$(nproc); sudo make install)'))
ERROR_CHECK(os.system(
'(cd '+modelCompilerDeps+'/nnef-deps/NNEF-Tools/parser/python; sudo python3 setup.py install)'))
else:
print("STATUS: Model Compiler Deps Pre-Installed - " +modelCompilerDeps+"\n")
else:
Expand Down
Loading

0 comments on commit c267dcb

Please sign in to comment.