Skip to content

Commit 1e5a631

Browse files
authored
Build and package - updates (#1451)
* CMakeLists - Upgrade cmake version required * FFMPEG - Version 5.X not supported * Setup - updates * Docs - updates * Package - Updates * GFX ID - Updates
1 parent 913c3ab commit 1e5a631

File tree

47 files changed

+158
-117
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+158
-117
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@
44

55
The full documentation for MIVisionX is available at [https://rocm.docs.amd.com/projects/MIVisionX/en/latest/doxygen/html/index.html](https://rocm.docs.amd.com/projects/MIVisionX/en/latest/doxygen/html/index.html)
66

7+
## (unreleased) MIVisionX 3.2.0
8+
9+
### Changed
10+
11+
* Setup: OpenCV package install for Ubuntu
12+
13+
### Known issues
14+
15+
* Installation on CentOS/RedHat/SLES requires the manual installation of the `FFMPEG` & `OpenCV` dev packages.
16+
* Hardware decode requires the ROCm `graphics` usecase.
17+
18+
### Upcoming changes
19+
20+
* Optimized audio augmentations support for VX_RPP
21+
22+
723
## MIVisionX 3.1.0 for ROCm 6.3.0
824

925
### Changed

CMakeLists.txt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1818
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1919
# THE SOFTWARE.
20-
cmake_minimum_required(VERSION 3.5)
21-
set(VERSION "3.1.0")
20+
cmake_minimum_required(VERSION 3.10)
21+
set(VERSION "3.2.0")
2222

2323
# Set Project Version and Language
2424
project(mivisionx VERSION ${VERSION} LANGUAGES CXX)
@@ -136,10 +136,7 @@ endif()
136136
if("${BACKEND}" STREQUAL "HIP")
137137
set(LOOM OFF)
138138
# Set supported GPU Targets
139-
set(DEFAULT_GPU_TARGETS "gfx908;gfx90a;gfx942;gfx1030;gfx1031;gfx1032;gfx1100;gfx1101;gfx1102")
140-
if (BUILD_WITH_AMD_ADVANCE)
141-
set(DEFAULT_GPU_TARGETS ${DEFAULT_GPU_TARGETS} "gfx1200;gfx1201")
142-
endif()
139+
set(DEFAULT_GPU_TARGETS "gfx908;gfx90a;gfx942;gfx1030;gfx1031;gfx1032;gfx1100;gfx1101;gfx1102;gfx1200;gfx1201")
143140

144141
# Set AMD GPU_TARGETS
145142
if((AMDGPU_TARGETS OR DEFINED ENV{AMDGPU_TARGETS}) AND (NOT GPU_TARGETS))
@@ -229,8 +226,8 @@ endif()
229226
set(MIVISIONX_RUNTIME_PACKAGE_LIST "rocm-hip-runtime, rpp, rocblas, miopen-hip, migraphx")
230227

231228
# Set the dev dependent packages
232-
set(MIVISIONX_DEBIAN_DEV_PACKAGE_LIST "half, rocm-hip-runtime-dev, rpp-dev, rocblas-dev, miopen-hip-dev, migraphx-dev, ffmpeg, libavcodec-dev, libavformat-dev, libavutil-dev, libswscale-dev")
233-
# TBD - Some RPM packages need Fusion Packages - ffmpeg, libavcodec-devel, libavformat-devel, libavutil-devel, libswscale-devel
229+
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")
230+
# TBD - Some RPM packages need Fusion Packages - ffmpeg, libavcodec-devel, libavformat-devel, libavutil-devel, libswscale-devel, libopencv
234231
set(MIVISIONX_RPM_DEV_PACKAGE_LIST "half, rocm-hip-runtime-devel, rpp-devel, rocblas-devel, miopen-hip-devel, migraphx-devel")
235232

236233
# Add rocDecode Deps - Exclude centos-7

MIVisionX-setup.py

Lines changed: 19 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,25 @@
3030

3131
__copyright__ = "Copyright 2018 - 2024, AMD ROCm MIVisionX"
3232
__license__ = "MIT"
33-
__version__ = "3.7.0"
33+
__version__ = "3.8.0"
3434
__email__ = "[email protected]"
3535
__status__ = "Shipping"
3636

37+
3738
# error check calls
38-
def ERROR_CHECK(call):
39-
status = call
40-
if(status != 0):
41-
print('ERROR_CHECK failed with status:'+str(status))
39+
def ERROR_CHECK(waitval):
40+
if(waitval != 0): # return code and signal flags
41+
print('ERROR_CHECK failed with status:'+str(waitval))
4242
traceback.print_stack()
43+
status = ((waitval >> 8) | waitval) & 255 # combine exit code and wait flags into single non-zero byte
4344
exit(status)
4445

4546
# Arguments
4647
parser = argparse.ArgumentParser()
4748
parser.add_argument('--directory', type=str, default='~/mivisionx-deps',
4849
help='Setup home directory - optional (default:~/)')
4950
parser.add_argument('--opencv', type=str, default='4.6.0',
50-
help='OpenCV Version - optional (default:4.6.0)')
51+
help='OpenCV Version - optional (default for non Ubuntu OS:4.6.0)')
5152
parser.add_argument('--ffmpeg', type=str, default='OFF',
5253
help='FFMPEG Installation - optional (default:OFF) [options:ON/OFF]')
5354
parser.add_argument('--neural_net', type=str, default='ON',
@@ -233,9 +234,7 @@ def ERROR_CHECK(call):
233234
if "centos" in os_info_data and "VERSION_ID=7" in os_info_data:
234235
libpkgConfig = "pkgconfig"
235236
commonPackages = [
236-
'gcc',
237237
'cmake',
238-
'git',
239238
'wget',
240239
'unzip',
241240
str(libpkgConfig),
@@ -340,18 +339,7 @@ def ERROR_CHECK(call):
340339
]
341340

342341
opencvDebianPackages = [
343-
'build-essential',
344-
'pkg-config',
345-
'libgtk2.0-dev',
346-
'libavcodec-dev',
347-
'libavformat-dev',
348-
'libswscale-dev',
349-
'libtbb-dev',
350-
'libjpeg-dev',
351-
'libpng-dev',
352-
'libtiff-dev',
353-
'libdc1394-dev',
354-
'unzip'
342+
'libopencv-dev'
355343
]
356344

357345
opencvRPMPackages = [
@@ -550,7 +538,7 @@ def ERROR_CHECK(call):
550538

551539
# Install OpenCV -- TBD cleanup
552540
ERROR_CHECK(os.system('(cd '+deps_dir+'/build; mkdir OpenCV )'))
553-
# Install pre-reqs
541+
# Install
554542
ERROR_CHECK(os.system(sudoValidate))
555543
if "Ubuntu" in platfromInfo:
556544
for i in range(len(opencvDebianPackages)):
@@ -566,12 +554,12 @@ def ERROR_CHECK(call):
566554
for i in range(len(opencvRPMPackages)):
567555
ERROR_CHECK(os.system('sudo '+linuxFlag+' '+linuxSystemInstall +
568556
' '+linuxSystemInstall_check+' install -y '+ opencvRPMPackages[i]))
569-
# OpenCV 4.6.0
570-
# Get Source and install
571-
ERROR_CHECK(os.system(
572-
'(cd '+deps_dir+'; wget https://github.com/opencv/opencv/archive/'+opencvVersion+'.zip )'))
573-
ERROR_CHECK(os.system('(cd '+deps_dir+'; unzip '+opencvVersion+'.zip )'))
574-
ERROR_CHECK(os.system('(cd '+deps_dir+'/build/OpenCV; '+linuxCMake +
557+
# OpenCV 4.6.0
558+
# Get Source and install
559+
ERROR_CHECK(os.system(
560+
'(cd '+deps_dir+'; wget https://github.com/opencv/opencv/archive/'+opencvVersion+'.zip )'))
561+
ERROR_CHECK(os.system('(cd '+deps_dir+'; unzip '+opencvVersion+'.zip )'))
562+
ERROR_CHECK(os.system('(cd '+deps_dir+'/build/OpenCV; '+linuxCMake +
575563
' -D WITH_EIGEN=OFF \
576564
-D WITH_GTK=ON \
577565
-D WITH_JPEG=ON \
@@ -585,10 +573,10 @@ def ERROR_CHECK(call):
585573
-D BUILD_LIST=core,features2d,highgui,imgcodecs,imgproc,photo,video,videoio \
586574
-D CMAKE_PLATFORM_NO_VERSIONED_SONAME=ON \
587575
../../opencv-'+opencvVersion+' )'))
588-
ERROR_CHECK(os.system('(cd '+deps_dir+'/build/OpenCV; make -j$(nproc))'))
589-
ERROR_CHECK(os.system(sudoValidate))
590-
ERROR_CHECK(os.system('(cd '+deps_dir+'/build/OpenCV; sudo make install)'))
591-
ERROR_CHECK(os.system('(cd '+deps_dir+'/build/OpenCV; sudo ldconfig)'))
576+
ERROR_CHECK(os.system('(cd '+deps_dir+'/build/OpenCV; make -j$(nproc))'))
577+
ERROR_CHECK(os.system(sudoValidate))
578+
ERROR_CHECK(os.system('(cd '+deps_dir+'/build/OpenCV; sudo make install)'))
579+
ERROR_CHECK(os.system('(cd '+deps_dir+'/build/OpenCV; sudo ldconfig)'))
592580

593581
if developerInstall == 'ON':
594582
ERROR_CHECK(os.system(sudoValidate))

README.md

Lines changed: 56 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ MIVisionX has several [applications](apps/README.md#applications) built on top o
4646

4747
[Neural net model compiler and optimizer](model_compiler/README.md#neural-net-model-compiler--optimizer) converts pre-trained neural net models to MIVisionX runtime code for optimized inference.
4848

49-
## rocAL
50-
51-
The ROCm Augmentation Library - [rocAL](rocAL/README.md) 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.
52-
53-
rocAL is now available as an independent module at [https://github.com/ROCm/rocAL](https://github.com/ROCm/rocAL). rocAL is deprecated in MIVisionX.
54-
5549
## Toolkit
5650

5751
[MIVisionX Toolkit](toolkit/README.md) is a comprehensive set of helpful tools for neural net creation, development, training, and deployment. The Toolkit provides useful tools to design, develop, quantize, prune, retrain, and infer your neural network work in any framework. The Toolkit has been designed to help you deploy your work on any AMD or 3rd party hardware, from embedded to servers.
@@ -76,19 +70,62 @@ MIVisionX toolkit provides tools for accomplishing your tasks throughout the who
7670
> [!IMPORTANT]
7771
> Some modules in MIVisionX can be built for `CPU ONLY`. To take advantage of `Advanced Features And Modules` we recommend using `AMD GPUs` or `AMD APUs`.
7872
79-
### Operating System
73+
### Operating Systems
8074

8175
#### Linux
82-
* Ubuntu - `20.04` / `22.04`
83-
* CentOS - `7`
76+
* Ubuntu - `22.04` / `24.04`
8477
* RedHat - `8` / `9`
8578
* SLES - `15-SP5`
8679

8780
#### Windows
8881
* Windows `10` / `11`
8982

9083
#### macOS
91-
* macOS - Ventura `13` / Sonoma `14`
84+
* macOS - Ventura `13` / Sonoma `14` / Sequoia `15`
85+
86+
### Libraries
87+
* CMake - Version `3.10` and above
88+
```shell
89+
sudo apt install cmake
90+
```
91+
* Half-precision floating-point(half) library - Version `1.12.0`
92+
```shell
93+
sudo apt install half
94+
```
95+
* MIOpen
96+
```shell
97+
sudo apt install miopen-hip-dev
98+
```
99+
* MIGraphX
100+
```shell
101+
sudo apt install migraphx-dev
102+
```
103+
* RPP
104+
```shell
105+
sudo apt install rpp-dev
106+
```
107+
* OpenCV - Version `3.X`/`4.X`
108+
```shell
109+
sudo apt install libopencv-dev
110+
```
111+
* pkg-config
112+
```shell
113+
sudo apt install pkg-config
114+
```
115+
* FFmpeg - Version `4.X`
116+
```shell
117+
sudo apt install ffmpeg libavcodec-dev libavformat-dev libavutil-dev libswscale-dev
118+
```
119+
120+
> [!IMPORTANT]
121+
> * On `Ubuntu 22.04` - Additional package required: `libstdc++-12-dev`
122+
>
123+
> ```shell
124+
> sudo apt install libstdc++-12-dev
125+
> ```
126+
127+
>[!NOTE]
128+
> All package installs are shown with the `apt` package manager. Use the appropriate package manager for your operating system.
92129
93130
## Installation instructions
94131
@@ -100,7 +137,8 @@ The installation process uses the following steps:
100137
101138
* Install ROCm `6.1.0` or later with [amdgpu-install](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/how-to/amdgpu-install.html) with `--usecase=rocm`
102139
103-
* Use **either** [Package install](#package-install) **or** [Source install](#source-install) as described below.
140+
>[!IMPORTANT]
141+
> Use **either** [package install](#package-install) **or** [source install](#source-install) as described below.
104142
105143
#### Package install
106144
@@ -123,9 +161,8 @@ Install MIVisionX runtime, development, and test packages.
123161
```
124162
125163
> [!IMPORTANT]
126-
> * Package install supports `HIP` backend
127-
> * Package install requires `OpenCV V4.6` manual install
128-
> * `CentOS`/`RedHat`/`SLES` requires `FFMPEG Dev` package manual install
164+
> * Package install supports `HIP` backend. For OpenCL backend build from source.
165+
> * `CentOS`/`RedHat`/`SLES` requires `OpenCV` & `FFMPEG` development packages manually installed
129166
130167
#### Source install
131168
@@ -210,7 +247,7 @@ For your convenience, we provide the setup script, `MIVisionX-setup.py`, which i
210247
macOS [build instructions](https://github.com/ROCm/MIVisionX/wiki/macOS#macos-build-instructions)
211248
212249
> [!IMPORTANT]
213-
> macOS only supports MIVisionX CPU backend
250+
> macOS only supports MIVisionX CPU backend on `x86` processors
214251
215252
## Verify installation
216253
@@ -301,18 +338,17 @@ Review all notable [changes](CHANGELOG.md#changelog) with the latest release
301338
302339
* Windows `10` / `11`
303340
* Linux distribution
304-
+ Ubuntu - `20.04` / `22.04`
305-
+ CentOS - `7`
341+
+ Ubuntu - `22.04` / `24.04`
306342
+ RHEL - `8` / `9`
307343
+ SLES - `15-SP5`
308-
* ROCm: rocm-core - `6.3.0.60300`
344+
* ROCm: `6.3.0`
309345
* RPP - `1.9.0.60300`
310346
* miopen-hip - `3.2.0.60300`
311347
* migraphx - `2.11.0.60300`
312-
* OpenCV - [4.6.0](https://github.com/opencv/opencv/releases/tag/4.6.0)
348+
* OpenCV - `4.6`
313349
* FFMPEG - [n4.4.2](https://github.com/FFmpeg/FFmpeg/releases/tag/n4.4.2)
314350
* Dependencies for all the above packages
315-
* MIVisionX Setup Script - `V3.7.0`
351+
* MIVisionX Setup Script - `V3.8.0`
316352
317353
### Known issues
318354

amd_openvx/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1919
# THE SOFTWARE.
2020

21-
cmake_minimum_required(VERSION 3.5)
21+
cmake_minimum_required(VERSION 3.10)
2222
project(amd_openvx)
2323

2424
if(GPU_SUPPORT AND "${BACKEND}" STREQUAL "HIP")

amd_openvx/openvx/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1919
# THE SOFTWARE.
2020

21-
cmake_minimum_required(VERSION 3.5)
21+
cmake_minimum_required(VERSION 3.10)
2222
set(VERSION "1.3.0")
2323
project(openvx VERSION ${VERSION} LANGUAGES CXX)
2424

amd_openvx/openvx/hipvx/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1919
# THE SOFTWARE.
2020

21-
cmake_minimum_required(VERSION 3.5)
21+
cmake_minimum_required(VERSION 3.10)
2222
project(openvx_hip CXX)
2323

2424
include_directories(${PROJECT_SOURCE_DIR}/../include ${PROJECT_SOURCE_DIR}/../ago ${PROJECT_SOURCE_DIR}/../api)

amd_openvx_extensions/CMakeLists.txt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1919
# THE SOFTWARE.
2020

21-
cmake_minimum_required(VERSION 3.5)
21+
cmake_minimum_required(VERSION 3.10)
2222
project(amd_openvx_extensions)
2323

2424
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
@@ -76,8 +76,13 @@ endif()
7676
if(GPU_SUPPORT)
7777
find_package(FFmpeg QUIET)
7878
if(FFMPEG_FOUND)
79-
add_subdirectory(amd_media)
80-
message("-- ${Green}AMD OpenVX Media Extension -- amd_media module added${ColourReset}")
79+
# TBD: FFMPEG multi-version support
80+
if(_FFMPEG_AVCODEC_VERSION VERSION_LESS_EQUAL 58.134.100)
81+
add_subdirectory(amd_media)
82+
message("-- ${Green}AMD OpenVX Media Extension -- amd_media module added${ColourReset}")
83+
else()
84+
message("-- ${Red}WARNING: FFMPEG Version Not Supported -- amd_media module excluded${ColourReset}")
85+
endif()
8186
else()
8287
message("-- ${Red}WARNING: FFMPEG Not Found -- amd_media module excluded${ColourReset}")
8388
endif(FFMPEG_FOUND)
@@ -94,7 +99,7 @@ if(GPU_SUPPORT)
9499
add_subdirectory(amd_custom)
95100
message("-- ${Green}AMD Custom Extension -- amd_custom module added${ColourReset}")
96101
else()
97-
message("-- ${Red}WARNING: GPU Support OpenCL/HIP Not Found -- amd_openvx_extensions modules for GPU excluded${ColourReset}")
102+
message("-- ${Red}WARNING: GPU Support OpenCL/HIP Not Found -- amd_openvx_extensions modules for GPU excluded${ColourReset}")
98103
endif()
99104
endif(GPU_SUPPORT)
100105

amd_openvx_extensions/amd_custom/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1919
# THE SOFTWARE.
2020

21-
cmake_minimum_required(VERSION 3.5)
21+
cmake_minimum_required(VERSION 3.10)
2222
set(VERSION "1.0.1")
2323
project(vx_amd_custom VERSION ${VERSION} LANGUAGES CXX)
2424

amd_openvx_extensions/amd_custom/custom_lib/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1919
# THE SOFTWARE.
2020

21-
cmake_minimum_required(VERSION 3.5)
21+
cmake_minimum_required(VERSION 3.10)
2222
project(custom_lib)
2323

2424
set(CMAKE_CXX_STANDARD 14)

0 commit comments

Comments
 (0)