Skip to content

Commit

Permalink
CTest - Updates (#1193)
Browse files Browse the repository at this point in the history
* CTest - NN Test reinstall OFF

* CTest - Add Test Script

* CTest - Lib Test Updates

* Lib Test - Fix

* Readme - Test Updates
  • Loading branch information
kiritigowda authored Sep 21, 2023
1 parent 91852d7 commit dd9b4ff
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 6,499 deletions.
18 changes: 10 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@

### Added

* CTest - OpenVX Tests
* Hardware Support
* CTest - Tests for install verification
* Hardware Support updates
* Doxygen - Support for API documentation

### Optimizations

* CMakeList Cleanup
* Readme

### Changed

Expand All @@ -30,28 +32,28 @@

* rocAL bug fix and updates

### Tested Configurations
### Tested configurations

* Windows `10` / `11`
* Linux distribution
+ Ubuntu - `20.04` / `22.04`
+ CentOS - `7` / `8`
+ RHEL - `8` / `9`
+ SLES - `15-SP4`
* ROCm: rocm-core - `5.4.3.50403-121`
* miopen-hip - `2.19.0.50403-121`
* miopen-opencl - `2.18.0.50300-63`
* migraphx - `2.4.0.50403-121`
* ROCm: rocm-core - `5.7.0.50700-6`
* miopen-hip - `2.20.0.50700-63`
* migraphx - `2.7.0.50700-63`
* Protobuf - [V3.12.4](https://github.com/protocolbuffers/protobuf/releases/tag/v3.12.4)
* OpenCV - [4.6.0](https://github.com/opencv/opencv/releases/tag/4.6.0)
* RPP - [1.2.0](https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp/releases/tag/1.2.0)
* RPP - [1.2.0.50700-63](https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp/releases/tag/1.2.0)
* FFMPEG - [n4.4.2](https://github.com/FFmpeg/FFmpeg/releases/tag/n4.4.2)
* Dependencies for all the above packages
* MIVisionX Setup Script - `V2.5.5`

### Known issues

* OpenCV 4.X support for some apps missing
* MIVisionX Package install requires manual prerequisites installation

## MIVisionX 2.4.0

Expand Down
70 changes: 37 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ MIVisionX toolkit is a set of comprehensive computer vision and machine intellig
- [Utilities](#utilities)
- [Prerequisites](#prerequisites)
- [Hardware](#hardware)
- [Operating System](#operating-system)
- [Operating System \& Prerequisites](#operating-system--prerequisites)
- [Windows](#windows)
- [macOS](#macos)
- [Linux](#linux)
- [Prerequisites setup script for Linux](#prerequisites-setup-script-for-linux)
- [Prerequisites for running the script](#prerequisites-for-running-the-script)
- [Build \& Install MIVisionX](#build--install-mivisionx)
- [Building on Windows](#building-on-windows)
- [Windows](#windows-1)
- [Using `Visual Studio`](#using-visual-studio)
- [Building on macOS](#building-on-macos)
- [Building on Linux](#building-on-linux)
- [macOS](#macos-1)
- [Linux](#linux-1)
- [Using `apt-get` / `yum` / `zypper`](#using-apt-get--yum--zypper)
- [Using MIVisionX-setup.py](#using-mivisionx-setuppy)
- [Using `MIVisionX-setup.py`](#using-mivisionx-setuppy)
- [Verify the Installation](#verify-the-installation)
- [Verifying on Linux / macOS](#verifying-on-linux--macos)
- [Verifying on Windows](#verifying-on-windows)
Expand Down Expand Up @@ -128,10 +128,10 @@ MIVisionX provides you with tools for accomplishing your tasks throughout the wh

## Utilities

* [inference_generator](utilities/inference_generator/README.md#inference-generator): generate inference library from pre-trained CAFFE models
* [loom_shell](utilities/loom_shell/README.md#radeon-loomsh): an interpreter to prototype 360 degree video stitching applications using a script
* [RunVX](utilities/runvx/README.md#amd-runvx): command-line utility to execute OpenVX graph described in GDF text file
* [mv_deploy](utilities/mv_deploy/README.md): consists of a model-compiler and necessary header/.cpp files which are required to run inference for a specific NeuralNet model
* [RunCL](utilities/runcl/README.md#amd-runcl): command-line utility to build, execute, and debug OpenCL programs
* [RunVX](utilities/runvx/README.md#amd-runvx): command-line utility to execute OpenVX graph described in GDF text file

## Prerequisites

Expand All @@ -143,7 +143,7 @@ MIVisionX provides you with tools for accomplishing your tasks throughout the wh

**Note:** 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`.

### Operating System
### Operating System & Prerequisites

#### Windows

Expand Down Expand Up @@ -172,7 +172,7 @@ MIVisionX provides you with tools for accomplishing your tasks throughout the wh
+ **CentOS** - `7` / `8`
+ **RedHat** - `8` / `9`
+ **SLES** - `15-SP4`
* Install [ROCm](https://docs.amd.com)
* Install [ROCm](https://rocmdocs.amd.com/en/latest/deploy/linux/installer/install.html) with `--usecase=graphics,rocm`
* CMake 3.5 or later
* MIOpen for [vx_nn](amd_openvx_extensions/amd_nn/README.md#openvx-neural-network-extension-library-vx_nn) extension
* MIGraphX for `vx_migraphx` extension
Expand All @@ -194,8 +194,8 @@ For the convenience of the developer, we provide the setup script `MIVisionX-set
+ CentOS - `7` / `8`
+ RedHat - `8` / `9`
+ SLES - `15-SP4`
* [ROCm supported hardware](https://docs.amd.com)
* [ROCm](https://docs.amd.com)
* [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`

**usage:**

Expand All @@ -215,12 +215,12 @@ For the convenience of the developer, we provide the setup script `MIVisionX-set
--rocm_path [ROCm Installation Path - optional (default:/opt/rocm) - ROCm Installation Required]
```
**Note:**
* **ROCm upgrade** with `sudo apt upgrade` requires the setup script **rerun**.
* **ROCm upgrade** requires the setup script **rerun**.
* use `X Window` / `X11` for [remote GUI app control](https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/wiki/X-Window-forwarding)

## Build & Install MIVisionX

### Building on Windows
### Windows

#### Using `Visual Studio`

Expand All @@ -229,16 +229,16 @@ For the convenience of the developer, we provide the setup script `MIVisionX-set

**NOTE:** `vx_nn` is not supported on `Windows` in this release

### Building on macOS
### macOS

macOS [build instructions](https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/wiki/macOS#macos-build-instructions)

### Building on Linux
### Linux

#### Using `apt-get` / `yum` / `zypper`
* [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`

* [ROCm supported hardware](https://docs.amd.com)
* Install [ROCm](https://docs.amd.com)
#### Using `apt-get` / `yum` / `zypper`

* On `Ubuntu`
```
Expand All @@ -250,7 +250,7 @@ macOS [build instructions](https://github.com/GPUOpen-ProfessionalCompute-Librar
```
* On `SLES`
```
sudo zypper install mivisionxF
sudo zypper install mivisionx
```

**Note:**
Expand All @@ -265,22 +265,21 @@ macOS [build instructions](https://github.com/GPUOpen-ProfessionalCompute-Librar
+ Docs folder into `/opt/rocm/share/doc/mivisionx`
* Package (.deb & .rpm) install requires `OpenCV v4.6` to execute `AMD OpenCV extensions`

#### Using MIVisionX-setup.py
#### Using `MIVisionX-setup.py`

* Install [ROCm](https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html)
* Use the below commands to set up and build MIVisionX
* Clone MIVisionX git repository

```
git clone https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX.git
cd MIVisionX
```

**Note:** MIVisionX has support for two GPU backends: **OPENCL** and **HIP**:

+ Instructions for building MIVisionX with the **HIP** GPU backend (i.e., default GPU backend):
* Instructions for building MIVisionX with the **HIP** GPU backend (i.e., default GPU backend):

+ run the setup script to install all the dependencies required by the **HIP** GPU backend:
```
cd MIVisionX
python MIVisionX-setup.py
```

Expand All @@ -293,12 +292,17 @@ macOS [build instructions](https://github.com/GPUOpen-ProfessionalCompute-Librar
sudo cmake --build . --target PyPackageInstall
sudo make install
```

+ run tests - [test option instructions](https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/wiki/CTest)
```
make test
```
**Note:**
+ `PyPackageInstall` used for rocal_pybind installation
+ rocal_pybind not supported on windows.
+ `sudo` required for pybind installation

+ Instructions for building MIVisionX with [**OPENCL** GPU backend](https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/wiki/OpenCL-Backend)
* Instructions for building MIVisionX with [**OPENCL** GPU backend](https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/wiki/OpenCL-Backend)


## Verify the Installation
Expand Down Expand Up @@ -350,8 +354,8 @@ Docker files to build MIVisionX containers are [available](docker#mivisionx-dock

#### Prerequisites
* Ubuntu `20.04`/`22.04`
* [ROCm supported hardware](https://docs.amd.com)
* [ROCm](https://docs.amd.com)
* [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`
* [Docker](https://docs.docker.com/engine/install/ubuntu/)

#### Workflow
Expand Down Expand Up @@ -432,20 +436,20 @@ Review all notable [changes](CHANGELOG.md#changelog) with the latest release
+ CentOS - `7` / `8`
+ RHEL - `8` / `9`
+ SLES - `15-SP4`
* ROCm: rocm-core - `5.4.3.50403-121`
* miopen-hip - `2.19.0.50403-121`
* miopen-opencl - `2.18.0.50300-63`
* migraphx - `2.4.0.50403-121`
* ROCm: rocm-core - `5.7.0.50700-6`
* miopen-hip - `2.20.0.50700-63`
* migraphx - `2.7.0.50700-63`
* Protobuf - [V3.12.4](https://github.com/protocolbuffers/protobuf/releases/tag/v3.12.4)
* OpenCV - [4.6.0](https://github.com/opencv/opencv/releases/tag/4.6.0)
* RPP - [1.2.0](https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp/releases/tag/1.2.0)
* RPP - [1.2.0.50700-63](https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp/releases/tag/1.2.0)
* FFMPEG - [n4.4.2](https://github.com/FFmpeg/FFmpeg/releases/tag/n4.4.2)
* Dependencies for all the above packages
* MIVisionX Setup Script - `V2.5.5`

### Known issues

* Package install requires **OpenCV** `V-4.6.0` to execute `AMD OpenCV extensions`
* OpenCV 4.X support for some apps missing
* MIVisionX Package install requires manual prerequisites installation

## MIVisionX Dependency Map

Expand Down
2 changes: 1 addition & 1 deletion tests/library_tests/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIVisionX Library Tests

## Script to check if all libraries are built
## Script to check if all libraries are built & installed

```
python runLibraryTests.py
Expand Down
8 changes: 4 additions & 4 deletions tests/library_tests/runLibraryTests.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,11 @@ def write_formatted(output, f):
platform_name = platform_name+'-SLES'
else:
print("\nMIVisionX Library Test on "+platform_name+" is unsupported")
print("MIVisionX Library Test Supported on: Ubuntu 20/22; CentOS 7/8; RedHat 8/9; & SLES 15 SP3")
print("MIVisionX Library Test Supported on: Ubuntu 20/22; CentOS 7/8; RedHat 8/9; & SLES 15 SP4")
exit(1)

# TBD - Install inxi package

print("\nMIVisionX Library Test V:"+__version__ +
" on "+platform_name+" is supported")

Expand Down Expand Up @@ -311,6 +313,4 @@ def write_formatted(output, f):
print("STATUS: Output Report File - "+reportFileDir)
if warning == 1:
print("WARNING: Not all modules of MIVisionX is built, check for missing dependencies")
else:
print("SUCCESS: All modules of MIVisionX built")
print("runLibraryTests.py completed - V:"+__version__+"\n")
print("MIVisionX Tests - runLibraryTests.py - V:"+__version__+"\n")
19 changes: 11 additions & 8 deletions tests/openvx_api_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
################################################################################
cmake_minimum_required(VERSION 3.5)

# TBD - Install additional data indepedent tests
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../library_tests DESTINATION ${CMAKE_INSTALL_DATADIR}/mivisionx/tests)

# default run
# canny
add_test(
Expand Down Expand Up @@ -130,42 +133,42 @@ if(GPU_SUPPORT)
# caffe2nnir2openvx Fuse flow
add_test(NAME caffe2nnir2openvx_fuse
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tests/neural_network_tests/runNeuralNetworkTests.py
--profiler_mode 2
--profiler_mode 2 --reinstall off
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
# caffe2nnir2openvx FP16 flow
add_test(NAME caffe2nnir2openvx_fp16
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tests/neural_network_tests/runNeuralNetworkTests.py
--profiler_mode 3
--profiler_mode 3 --reinstall off
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
# onnx2nnir2openvx No Fuse flow
add_test(NAME onnx2nnir2openvxx_no_fuse
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tests/neural_network_tests/runNeuralNetworkTests.py
--profiler_mode 4
--profiler_mode 4 --reinstall off
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
# onnx2nnir2openvx Fuse flow
add_test(NAME onnx2nnir2openvxx_fuse
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tests/neural_network_tests/runNeuralNetworkTests.py
--profiler_mode 5
--profiler_mode 5 --reinstall off
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
# onnx2nnir2openvx FP16 flow
add_test(NAME onnx2nnir2openvxx_fp16
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tests/neural_network_tests/runNeuralNetworkTests.py
--profiler_mode 6
--profiler_mode 6 --reinstall off
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
# nnef2nnir2openvx No Fuse flow
add_test(NAME nnef2nnir2openvxx_no_fuse
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tests/neural_network_tests/runNeuralNetworkTests.py
--profiler_mode 7
--profiler_mode 7 --reinstall off
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
# nnef2nnir2openvx Fuse flow
add_test(NAME nnef2nnir2openvxx_fuse
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tests/neural_network_tests/runNeuralNetworkTests.py
--profiler_mode 8
--profiler_mode 8 --reinstall off
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
# nnef2nnir2openvx FP16 flow
add_test(NAME nnef2nnir2openvxx_fp16
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tests/neural_network_tests/runNeuralNetworkTests.py
--profiler_mode 9
--profiler_mode 9 --reinstall off
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
endif(NEURAL_NET AND Python3_FOUND)

Expand Down
41 changes: 0 additions & 41 deletions utilities/inference_generator/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit dd9b4ff

Please sign in to comment.