Skip to content

Commit

Permalink
CMakeList Updates - ROCm 6.2 Updates (#1349)
Browse files Browse the repository at this point in the history
* CMakeList Updates - ROCm 6.2 Updates

* Docker and setup - Fix and updates

* CMakeList - Fix MI300 Link

* Docker - Cleanup

* BUILD_WITH_AMD_ADVANCE - Auto set with ROCm Version

* rocDecode - Add only for not CentOS7
  • Loading branch information
kiritigowda committed May 17, 2024
1 parent cdd3e24 commit b2f7f6e
Show file tree
Hide file tree
Showing 28 changed files with 95 additions and 294 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Documentation for MIVisionX is available at
* OpenCV - [4.6.0](https://github.com/opencv/opencv/releases/tag/4.6.0)
* FFMPEG - [n4.4.2](https://github.com/FFmpeg/FFmpeg/releases/tag/n4.4.2)
* Dependencies for all the above packages
* MIVisionX Setup Script - `V3.1.0`
* MIVisionX Setup Script - `V3.2.0`

### Known issues

Expand Down
15 changes: 10 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ option(NEURAL_NET "Build MIVisionX with Neural Net Support" ON)
option(LOOM "Build MIVisionX with LOOM Support" ON)
option(GPU_SUPPORT "Build MIVisionX with GPU Support" ON)
option(MIGRAPHX "Build MIVisionX with MIGraphX Support" ON)
option(BUILD_WITH_AMD_ADVANCE "Build MIVisionX for advanced AMD GPU Architecture" OFF)

if(WIN32)
set(BACKEND "OpenCL")
Expand Down Expand Up @@ -136,9 +135,6 @@ endif()
if(HIP_FOUND)
message("-- ${BoldBlue}ROCm Version -- ${HIP_VERSION}${ColourReset}")
set(LOOM OFF)
if(HIP_VERSION VERSION_GREATER 5.7.50701)
set(BUILD_WITH_AMD_ADVANCE ON)
endif()
endif()

message("-- ${Cyan}MIVisionX Developer Options${ColourReset}")
Expand All @@ -147,7 +143,6 @@ message("-- ${Cyan} -D LOOM=${LOOM} [Turn ON/OFF LOOM OpenCL Modules (defaul
message("-- ${Cyan} -D GPU_SUPPORT=${GPU_SUPPORT} [Turn ON/OFF GPU support (default:ON)]${ColourReset}")
message("-- ${Cyan} -D MIGRAPHX=${MIGRAPHX} [Turn ON/OFF MIGraphX Module (default:ON)]${ColourReset}")
message("-- ${Cyan} -D BACKEND=${BACKEND} [Select MIVisionX Backend [options:CPU/OPENCL/HIP](default:HIP)]${ColourReset}")
message("-- ${Cyan} -D BUILD_WITH_AMD_ADVANCE=${BUILD_WITH_AMD_ADVANCE} [Turn ON/OFF Build for AMD advanced GPUs(default:OFF)]${ColourReset}")

add_subdirectory(amd_openvx)
add_subdirectory(amd_openvx_extensions)
Expand Down Expand Up @@ -204,6 +199,16 @@ set(MIVISIONX_DEBIAN_DEV_PACKAGE_LIST "rocm-hip-runtime-dev, rpp-dev, rocblas-d
# TBD - Some RPM packages need Fusion Packages - ffmpeg, libavcodec-devel, libavformat-devel, libavutil-devel, libswscale-devel
set(MIVISIONX_RPM_DEV_PACKAGE_LIST "rocm-hip-runtime-devel, rpp-devel, rocblas-devel, miopen-hip-devel, migraphx-devel")

# Add rocDecode Deps - Exclude centos-7
file(READ "/etc/os-release" OS_RELEASE)
string(REGEX MATCH "CentOS-7" CENTOS_7_FOUND ${OS_RELEASE})
if(NOT CENTOS_7_FOUND)
set(MIVISIONX_DEBIAN_PACKAGE_LIST "${MIVISIONX_DEBIAN_PACKAGE_LIST}, rocdecode")
set(MIVISIONX_RPM_PACKAGE_LIST "${MIVISIONX_RPM_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()

# '%{?dist}' breaks manual builds on debian systems due to empty Provides
execute_process(
COMMAND rpm --eval %{?dist}
Expand Down
32 changes: 31 additions & 1 deletion 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.1.0"
__version__ = "3.2.0"
__email__ = "[email protected]"
__status__ = "Shipping"

Expand Down Expand Up @@ -279,6 +279,16 @@ def ERROR_CHECK(call):
'rpp-devel'
]

rocdecodeDebianPackages = [
'rocdecode',
'rocdecode-dev'
]

rocdecodeRPMPackages = [
'rocdecode',
'rocdecode-devel'
]

opencvDebianPackages = [
'build-essential',
'pkg-config',
Expand Down Expand Up @@ -333,6 +343,16 @@ def ERROR_CHECK(call):
for i in range(len(rppRPMPackages)):
ERROR_CHECK(os.system('sudo '+linuxFlag+' '+linuxSystemInstall +
' '+linuxSystemInstall_check+' install -y '+ rppRPMPackages[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]))
else:
for i in range(len(rocdecodeRPMPackages)):
ERROR_CHECK(os.system('sudo '+linuxFlag+' '+linuxSystemInstall +
' '+linuxSystemInstall_check+' install -y '+ rocdecodeRPMPackages[i]))

print("\nMIVisionX Dependencies Re-Installed with MIVisionX-setup.py V-"+__version__+"\n")
exit()
Expand Down Expand Up @@ -412,6 +432,16 @@ def ERROR_CHECK(call):
' '+linuxSystemInstall_check+' install -y '+ rppRPMPackages[i]))
else:
print("\nSTATUS: MIVisionX Setup: AMD VX RPP only supported with HIP backend\n")

# rocDecode
if "Ubuntu" in platfromInfo:
for i in range(len(rocdecodeDebianPackages)):
ERROR_CHECK(os.system('sudo '+linuxFlag+' '+linuxSystemInstall +
' '+linuxSystemInstall_check+' install -y '+ rocdecodeDebianPackages[i]))
else:
for i in range(len(rocdecodeRPMPackages)):
ERROR_CHECK(os.system('sudo '+linuxFlag+' '+linuxSystemInstall +
' '+linuxSystemInstall_check+' install -y '+ rocdecodeRPMPackages[i]))

# Install ffmpeg
if ffmpegInstall == 'ON':
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ Review all notable [changes](CHANGELOG.md#changelog) with the latest release
* OpenCV - [4.6.0](https://github.com/opencv/opencv/releases/tag/4.6.0)
* FFMPEG - [n4.4.2](https://github.com/FFmpeg/FFmpeg/releases/tag/n4.4.2)
* Dependencies for all the above packages
* MIVisionX Setup Script - `V3.1.0`
* MIVisionX Setup Script - `V3.2.0`
### Known issues
Expand Down
5 changes: 1 addition & 4 deletions amd_openvx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ if(GPU_SUPPORT AND "${BACKEND}" STREQUAL "HIP")
endif()
endif()
list(APPEND CMAKE_PREFIX_PATH ${ROCM_PATH} ${ROCM_PATH}/hip)
set(DEFAULT_AMDGPU_TARGETS "gfx803;gfx900;gfx906;gfx908;gfx90a;gfx940;gfx1030;gfx1031;gfx1032;gfx1100")
if (BUILD_WITH_AMD_ADVANCE)
set(DEFAULT_AMDGPU_TARGETS ${DEFAULT_AMDGPU_TARGETS} "gfx941;gfx942")
endif()
set(DEFAULT_AMDGPU_TARGETS "gfx908;gfx90a;gfx940;gfx941;gfx942;gfx1030;gfx1031;gfx1032;gfx1100;gfx1101;gfx1102")
set(AMDGPU_TARGETS "${DEFAULT_AMDGPU_TARGETS}" CACHE STRING "List of specific machine types for library to target")
find_package(HIP QUIET)
if(HIP_FOUND)
Expand Down
5 changes: 1 addition & 4 deletions amd_openvx_extensions/amd_nn/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ if(GPU_SUPPORT AND "${BACKEND}" STREQUAL "OPENCL")
elseif(GPU_SUPPORT AND "${BACKEND}" STREQUAL "HIP")
set(OpenCL_FOUND FALSE)
list(APPEND CMAKE_PREFIX_PATH ${ROCM_PATH} ${ROCM_PATH}/hip)
set(DEFAULT_AMDGPU_TARGETS "gfx803;gfx900;gfx906;gfx908;gfx90a;gfx940;gfx1030;gfx1031;gfx1032;gfx1100")
if (BUILD_WITH_AMD_ADVANCE)
set(DEFAULT_AMDGPU_TARGETS ${DEFAULT_AMDGPU_TARGETS} "gfx941;gfx942")
endif()
set(DEFAULT_AMDGPU_TARGETS "gfx908;gfx90a;gfx940;gfx941;gfx942;gfx1030;gfx1031;gfx1032;gfx1100;gfx1101;gfx1102")
set(AMDGPU_TARGETS "${DEFAULT_AMDGPU_TARGETS}" CACHE STRING "List of specific machine types for library to target")
find_package(HIP REQUIRED)
find_package(rocblas PATHS ${ROCM_PATH} REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Docker is a set of platform as a service (PaaS) products that use OS-level virtu
#### Prerequisites
* Ubuntu `20.04`/`22.04`
* [ROCm supported hardware](https://rocm.docs.amd.com/en/latest/release/gpu_os_support.html)
* Install [ROCm](https://rocmdocs.amd.com/en/latest/deploy/linux/installer/install.html) with `--usecase=graphics,rocm`
* Install [ROCm](https://rocmdocs.amd.com/en/latest/deploy/linux/installer/install.html) with `--usecase=rocm`
* [Docker](https://docs.docker.com/engine/install/ubuntu/)

#### Workflow
Expand Down
41 changes: 0 additions & 41 deletions docker/conformance/openvx-1-3-on-centos7.dockerfile

This file was deleted.

37 changes: 0 additions & 37 deletions docker/conformance/openvx-1-3-on-centos8.dockerfile

This file was deleted.

42 changes: 0 additions & 42 deletions docker/conformance/openvx-1-3-on-ubuntu18.dockerfile

This file was deleted.

6 changes: 3 additions & 3 deletions docker/conformance/openvx-1-3-on-ubuntu20.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ RUN apt-get update -y
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install gcc g++ cmake pkg-config git
# install ROCm for mivisionx OpenCL/HIP dependency
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install initramfs-tools libnuma-dev wget sudo keyboard-configuration && \
wget https://repo.radeon.com/amdgpu-install/22.20/ubuntu/focal/amdgpu-install_22.20.50200-1_all.deb && \
sudo apt-get install -y ./amdgpu-install_22.20.50200-1_all.deb && \
wget https://repo.radeon.com/amdgpu-install/6.1.1/ubuntu/focal/amdgpu-install_6.1.60101-1_all.deb && \
sudo apt-get install -y ./amdgpu-install_6.1.60101-1_all.deb && \
sudo apt-get update -y && \
sudo amdgpu-install -y --usecase=graphics,rocm
sudo amdgpu-install -y --usecase=rocm

WORKDIR /workspace

Expand Down
36 changes: 0 additions & 36 deletions docker/linux/mivisionx-on-rhel-8.dockerfile

This file was deleted.

Loading

0 comments on commit b2f7f6e

Please sign in to comment.