diff --git a/CHANGELOG.md b/CHANGELOG.md index 4af2ea0f02..0b982e27c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -30,7 +32,7 @@ * rocAL bug fix and updates -### Tested Configurations +### Tested configurations * Windows `10` / `11` * Linux distribution @@ -38,13 +40,12 @@ + 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` @@ -52,6 +53,7 @@ ### Known issues * OpenCV 4.X support for some apps missing +* MIVisionX Package install requires manual prerequisites installation ## MIVisionX 2.4.0 diff --git a/CMakeLists.txt b/CMakeLists.txt index d0ca237736..2b322b064e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,7 +38,6 @@ set(ROCM_PATH /opt/rocm CACHE PATH "Default ROCm installation path") if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX ${ROCM_PATH} CACHE PATH "MIVisionX default installation path" FORCE) endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) -set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) # MIVisionX Default Options option(ENHANCED_MESSAGE "MIVisionX Enhanced Message Option" ON) diff --git a/README.md b/README.md index e4cb9d0bcc..d66954d290 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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 @@ -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 @@ -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 @@ -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:** @@ -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` @@ -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` ``` @@ -250,7 +250,7 @@ macOS [build instructions](https://github.com/GPUOpen-ProfessionalCompute-Librar ``` * On `SLES` ``` - sudo zypper install mivisionxF + sudo zypper install mivisionx ``` **Note:** @@ -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 ``` @@ -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 @@ -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 @@ -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 diff --git a/amd_openvx_extensions/amd_nn/CMakeLists.txt b/amd_openvx_extensions/amd_nn/CMakeLists.txt index 0dbd18befb..c0c21e45f0 100644 --- a/amd_openvx_extensions/amd_nn/CMakeLists.txt +++ b/amd_openvx_extensions/amd_nn/CMakeLists.txt @@ -132,7 +132,7 @@ if(BUILD_DEV) install(DIRECTORY ../../apps/dg_test DESTINATION ${CMAKE_INSTALL_DATADIR}/mivisionx/apps) install(DIRECTORY ../../apps/mivisionx_inference_analyzer DESTINATION ${CMAKE_INSTALL_DATADIR}/mivisionx/apps) install(DIRECTORY ../../apps/mivisionx_openvx_classifier DESTINATION ${CMAKE_INSTALL_DATADIR}/mivisionx/apps) - install(DIRECTORY ../../samples/inference/mv_objdetect DESTINATION ${CMAKE_INSTALL_DATADIR}/mivisionx/samples) + install(DIRECTORY ../../samples/mv_objdetect DESTINATION ${CMAKE_INSTALL_DATADIR}/mivisionx/samples) install(DIRECTORY ../../samples/model_compiler_samples DESTINATION ${CMAKE_INSTALL_DATADIR}/mivisionx/samples) endif(BUILD_DEV) diff --git a/apps/image_augmentation/README.md b/apps/image_augmentation/README.md index 7251204b8d..cc5daaa37a 100644 --- a/apps/image_augmentation/README.md +++ b/apps/image_augmentation/README.md @@ -8,7 +8,7 @@ This application demonstrates the basic usage of rocAL's C API to load JPEG imag ### Pre-requisites -* Ubuntu Linux, [version `16.04` or later](https://www.microsoft.com/software-download/windows10) +* Ubuntu Linux, [version `20.04` or later](https://www.microsoft.com/software-download/windows10) * rocAL library (Part of the MIVisionX toolkit) * [OpenCV 3.1](https://github.com/opencv/opencv/releases) or higher * Radeon Performance Primitives (RPP) diff --git a/apps/mivisionx_inference_analyzer/README.md b/apps/mivisionx_inference_analyzer/README.md index d55141c2dd..6ebc4a7d5f 100644 --- a/apps/mivisionx_inference_analyzer/README.md +++ b/apps/mivisionx_inference_analyzer/README.md @@ -36,7 +36,7 @@ Pre-trained models in [ONNX](https://onnx.ai/), [NNEF](https://www.khronos.org/n ## Prerequisites -* Ubuntu `16.04` / `18.04` or CentOS `7.5` / `7.6` +* Ubuntu `20.04` / `22.04` or CentOS `7.5` / `7.6` * [ROCm supported hardware](https://rocm.github.io/ROCmInstall.html#hardware-support) + AMD Radeon GPU or AMD APU required * Latest [ROCm](https://github.com/RadeonOpenCompute/ROCm#installing-from-amd-rocm-repositories) diff --git a/docs/.sphinx/_toc.yml.in b/docs/.sphinx/_toc.yml.in index 90ad0fb2d0..12923094b0 100644 --- a/docs/.sphinx/_toc.yml.in +++ b/docs/.sphinx/_toc.yml.in @@ -64,7 +64,7 @@ subtrees: - entries: - file: samples/c_samples/README - file: samples/gdf/README - - file: samples/inference/mv_objdetect/README + - file: samples/mv_objdetect/README - file: samples/loom_360_stitch/README - file: samples/model_compiler_samples/README subtrees: diff --git a/docs/.sphinx/requirements.in b/docs/.sphinx/requirements.in index 8a7eff9103..49693b7942 100644 --- a/docs/.sphinx/requirements.in +++ b/docs/.sphinx/requirements.in @@ -1 +1,2 @@ -rocm-docs-core[api_reference]==0.24.0 +rocm-docs-core[api_reference]>=0.24.0 + diff --git a/docs/.sphinx/requirements.txt b/docs/.sphinx/requirements.txt index a67aee59b2..d62b231589 100644 --- a/docs/.sphinx/requirements.txt +++ b/docs/.sphinx/requirements.txt @@ -47,7 +47,7 @@ fastjsonschema==2.16.3 # via rocm-docs-core gitdb==4.0.10 # via gitpython -gitpython==3.1.34 +gitpython==3.1.35 # via rocm-docs-core idna==3.4 # via requests @@ -110,7 +110,7 @@ requests==2.31.0 # via # pygithub # sphinx -rocm-docs-core[api_reference]==0.24.0 +rocm-docs-core[api_reference]>=0.24.0 # via -r requirements.in smmap==5.0.0 # via gitdb diff --git a/samples/README.md b/samples/README.md index ee0580bcf5..9fab99934c 100644 --- a/samples/README.md +++ b/samples/README.md @@ -6,7 +6,7 @@ MIVisionX samples using OpenVX and OpenVX extensions. In the samples below we wi * [GDF - Graph Description Format Samples](#gdf---graph-description-format) * [Loom 360 Stitch - Radeon Loom 360 Stitch Samples](#loom-360-stitch---radeon-loom-360-stitch-samples) * [Model Compiler Samples - Run Efficient Inference](#model-compiler-samples---run-efficient-inference) -* [MIVisionX Inference Deploy Samples](inference/mv_objdetect/) +* [MIVisionX Inference Deploy Samples](mv_objdetect) ## GDF - Graph Description Format @@ -108,7 +108,7 @@ make MIVisionX samples using [LoomShell](../utilities/loom_shell/README.md#radeon-loomshell) -[![Loom Stitch](https://raw.githubusercontent.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/develop/docs/data/loom-4.pngloom-4.png)](https://youtu.be/E8pPU04iZjw) +[![Loom Stitch](https://raw.githubusercontent.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/develop/docs/data/loom-4.png)](https://youtu.be/E8pPU04iZjw) **Note:** @@ -225,3 +225,11 @@ In this [sample](model_compiler_samples/README.md#mivisionx-model-compiler-sampl ### [Sample-3: Classification Using Pre-Trained NNEF Model](model_compiler_samples/README.md#sample-3---classification-using-pre-trained-nnef-model) ### [Sample-4: Classification Using Pre-Trained Caffe Model](model_compiler_samples/README.md#sample-4---classification-using-pre-trained-caffe-model) + +## MV Object Detect Samples + +This [sample](mv_objdetect) shows how to run video decoding and object detection using pre-trained `YoloV2` Caffe Model + +The sample demonstrates the use of mv_compile utility to do video decoding and inference. + +
\ No newline at end of file diff --git a/samples/model_compiler_samples/README.md b/samples/model_compiler_samples/README.md index 934fda9110..bfa19a33d0 100644 --- a/samples/model_compiler_samples/README.md +++ b/samples/model_compiler_samples/README.md @@ -27,7 +27,7 @@ Pre-trained models in [ONNX](https://onnx.ai/), [NNEF](https://www.khronos.org/n ### Prerequisites -* Ubuntu `18.04`/`20.04` or CentOS `7`/`8` +* Ubuntu `20.04`/`22.04` or CentOS `7`/`8` * [ROCm supported hardware](https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.1.1/page/Prerequisite_Actions.html) * AMD Radeon GPU or AMD APU required * Latest [ROCm](https://docs.amd.com/category/ROCm™%20v5.x) @@ -35,11 +35,23 @@ Pre-trained models in [ONNX](https://onnx.ai/), [NNEF](https://www.khronos.org/n #### Docker for Samples -MIVisionX provides developers with [docker images](https://hub.docker.com/u/mivisionx) for [Ubuntu 18.04](https://hub.docker.com/r/mivisionx/ubuntu-18.04), [Ubuntu 20.04](https://hub.docker.com/r/mivisionx/ubuntu-20.04), [CentOS 7](https://hub.docker.com/r/mivisionx/centos-7), & [CentOS 8](https://hub.docker.com/r/mivisionx/centos-8). Using docker images developers can quickly prototype and build applications without having to be locked into a single system setup or lose valuable time figuring out the dependencies of the underlying software. +MIVisionX provides developers with docker images for Ubuntu `20.04` / `22.04`. Using docker images developers can quickly prototype and build applications without having to be locked into a single system setup or lose valuable time figuring out the dependencies of the underlying software. -##### Docker with display option for the samples +Docker files to build MIVisionX containers are [available](docker#mivisionx-docker) + +### MIVisionX Docker +* [Ubuntu 20.04](https://cloud.docker.com/repository/docker/mivisionx/ubuntu-20.04) +* [Ubuntu 22.04](https://cloud.docker.com/repository/docker/mivisionx/ubuntu-22.04) + +### Docker Workflow on Ubuntu `20.04`/`22.04` -* Check [docker prerequisites](https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX#docker-workflow-sample-on-ubuntu-1804--2004) +#### Prerequisites +* Ubuntu `20.04`/`22.04` +* [ROCm supported hardware](https://docs.amd.com) +* [ROCm](https://docs.amd.com) +* [Docker](https://docs.docker.com/engine/install/ubuntu/) + +##### Docker with display option for the samples * Start docker with display ```` diff --git a/samples/inference/mv_objdetect/CMakeLists.txt b/samples/mv_objdetect/CMakeLists.txt similarity index 100% rename from samples/inference/mv_objdetect/CMakeLists.txt rename to samples/mv_objdetect/CMakeLists.txt diff --git a/samples/inference/mv_objdetect/README.md b/samples/mv_objdetect/README.md similarity index 97% rename from samples/inference/mv_objdetect/README.md rename to samples/mv_objdetect/README.md index 6f2bf21591..b05ac02b13 100644 --- a/samples/inference/mv_objdetect/README.md +++ b/samples/mv_objdetect/README.md @@ -9,8 +9,7 @@ The sample has two .cpp files, `mvobjdetect.cpp` and `visualize.cpp`. But it nee ## Prerequisites * Linux - * Ubuntu `18.04`/`20.04` - * CentOS `7`/`8` + * Ubuntu `20.04`/`22.04` * [ROCm supported hardware](https://docs.amd.com) * **GPU**: [AMD Radeon™ Graphics](https://docs.amd.com/bundle/Hardware_and_Software_Reference_Guide/page/Hardware_and_Software_Support.html) [Required] * **APU**: [AMD Radeon™ `Mobile`/`Embedded`](https://docs.amd.com/bundle/Hardware_and_Software_Reference_Guide/page/Hardware_and_Software_Support.html) [optional] @@ -33,7 +32,7 @@ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/rocm/lib wget https://github.com/kiritigowda/YoloV2NCS/raw/master/models/caffemodels/yoloV2Tiny20.caffemodel ``` -### Step 2. compile model for OPENCL-ROCm-OpenVX backend using mv_compile utility +### Step 2. compile model for OpenVX backend using mv_compile utility The mv_compile utility generates deployment library, header files, and .cpp files required to run inference for the specified model. * Usage: @@ -149,7 +148,7 @@ cd .. ### Step 10. Sample output for multiple video object detection - + # License This project is licensed under the MIT License - see the LICENSE.md file for details diff --git a/samples/inference/mv_objdetect/data/Videos/Videos_4.txt b/samples/mv_objdetect/data/Videos/Videos_4.txt similarity index 100% rename from samples/inference/mv_objdetect/data/Videos/Videos_4.txt rename to samples/mv_objdetect/data/Videos/Videos_4.txt diff --git a/samples/inference/mv_objdetect/data/images/Video_4_screenshot.png b/samples/mv_objdetect/data/images/Video_4_screenshot.png similarity index 100% rename from samples/inference/mv_objdetect/data/images/Video_4_screenshot.png rename to samples/mv_objdetect/data/images/Video_4_screenshot.png diff --git a/samples/inference/mv_objdetect/data/images/img_04.JPG b/samples/mv_objdetect/data/images/img_04.JPG similarity index 100% rename from samples/inference/mv_objdetect/data/images/img_04.JPG rename to samples/mv_objdetect/data/images/img_04.JPG diff --git a/samples/inference/mv_objdetect/mvobjdetect.cpp b/samples/mv_objdetect/mvobjdetect.cpp similarity index 100% rename from samples/inference/mv_objdetect/mvobjdetect.cpp rename to samples/mv_objdetect/mvobjdetect.cpp diff --git a/samples/inference/mv_objdetect/visualize.cpp b/samples/mv_objdetect/visualize.cpp similarity index 100% rename from samples/inference/mv_objdetect/visualize.cpp rename to samples/mv_objdetect/visualize.cpp diff --git a/samples/inference/mv_objdetect/visualize.h b/samples/mv_objdetect/visualize.h similarity index 100% rename from samples/inference/mv_objdetect/visualize.h rename to samples/mv_objdetect/visualize.h diff --git a/tests/library_tests/README.md b/tests/library_tests/README.md index e73529318f..02181f3ff5 100644 --- a/tests/library_tests/README.md +++ b/tests/library_tests/README.md @@ -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 diff --git a/tests/library_tests/runLibraryTests.py b/tests/library_tests/runLibraryTests.py index 84ba97b4a5..aacc2d586b 100644 --- a/tests/library_tests/runLibraryTests.py +++ b/tests/library_tests/runLibraryTests.py @@ -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") @@ -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") diff --git a/tests/openvx_api_tests/CMakeLists.txt b/tests/openvx_api_tests/CMakeLists.txt index 835e77a60f..2072b7c27e 100644 --- a/tests/openvx_api_tests/CMakeLists.txt +++ b/tests/openvx_api_tests/CMakeLists.txt @@ -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( @@ -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) diff --git a/utilities/inference_generator/CMakeLists.txt b/utilities/inference_generator/CMakeLists.txt deleted file mode 100644 index 9f8488afba..0000000000 --- a/utilities/inference_generator/CMakeLists.txt +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) 2017 - 2023 Advanced Micro Devices, Inc. All rights reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -cmake_minimum_required(VERSION 3.5) -project(inference_generator) - -set(CMAKE_CXX_STANDARD 14) - -find_package(Protobuf REQUIRED) -PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS proto/caffe.proto) - -include_directories(${CMAKE_CURRENT_BINARY_DIR}) -list(APPEND CAFFE_SOURCES src/caffe2openvx.cpp ${PROTO_SRCS} ${PROTO_HDRS}) -add_executable(caffe2openvx ${CAFFE_SOURCES}) -target_link_libraries(caffe2openvx ${PROTOBUF_LIBRARIES}) -install (TARGETS caffe2openvx DESTINATION ${CMAKE_INSTALL_BINDIR}) - -if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd") -else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14") -endif() - diff --git a/utilities/inference_generator/README.md b/utilities/inference_generator/README.md deleted file mode 100644 index 067fae1cf3..0000000000 --- a/utilities/inference_generator/README.md +++ /dev/null @@ -1,111 +0,0 @@ -# Inference Generator - -caffe2openvx: Convert a pre-trained CAFFE model into a C library for use by applications. -* Extract neural network model from `deploy.prototxt` - + generate C code that instantiates OpenVX kernels from [vx_nn](https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/tree/master/vx_nn/README.md) module - + generate build scripts that package C code into a library - + the generated C code or library can be easily integrated into an application for running inference -* Extract weights and biases from `weights.caffemodel` into separates folders for use by the C library during initialization -* Also generate a GDF for quick prototyping and kernel debugging - -The generated C code will have two functions in `annmodule.h`: - -``` -void annGetTensorDimensions( - vx_size dimInput[4], // input tensor dimensions - vx_size dimOutput[4] // output tensor dimensions - ); - -vx_graph annCreateGraph( - vx_context context, // OpenVX context - vx_tensor input, // input tensor - vx_tensor output, // output tensor - const char * dataFolder // folder with weights and biases - ); -or -vx_graph annCreateGraphWithInputImage( - vx_context context, // OpenVX context - vx_image input, // input image (RGB or U8) - vx_tensor output, // output tensor - const char * dataFolder // folder with weights and biases - ); -or -vx_graph annCreateGraphWithInputImageWithArgmaxTensor( - vx_context context, // OpenVX context - vx_image input, // input image (RGB or U8) - vx_tensor output, // output tensor - const char * dataFolder // folder with weights and biases - ); -or -vx_graph annCreateGraphWithInputImageWithArgmaxImage( - vx_context context, // OpenVX context - vx_image input, // input image (RGB or U8) - vx_image output, // output image (U8) - const char * dataFolder // folder with weights and biases - ); -or -vx_graph annCreateGraphWithInputImageWithArgmaxImageWithLut( - vx_context context, // OpenVX context - vx_image input, // input image (RGB or U8) - vx_image output, // output image (RGB) - const char * dataFolder // folder with weights and biases - ); -``` - -* `annGetTensorDimensions`: allows an application to query dimensions of input and output tensors -* `annCreateGraph` (or another variant above): creates and initializes a graph with trained neural network for inference - -## Command-line Usage - -``` - % caffe2openvx - [options] -