Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenVX - Documentation #625

Merged
merged 1 commit into from
Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ MIVisionX toolkit is a set of comprehensive computer vision and machine intellig

[AMD OpenVX](amd_openvx#amd-openvx-amd_openvx) is a highly optimized open source implementation of the <a href="https://www.khronos.org/openvx/" target="_blank">Khronos OpenVX™</a> computer vision specification. It allows for rapid prototyping as well as fast execution on a wide range of computer hardware, including small embedded x86 CPUs and large workstation discrete GPUs.

<a href="https://www.khronos.org/openvx/" target="_blank">Khronos OpenVX™</a> 1.0.1 conformant implementation is available in [MIVisionX Lite](https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/tree/openvx-1.0.1)
<a href="https://www.khronos.org/registry/OpenVX/specs/1.0.1/html/index.html" target="_blank">Khronos OpenVX™ 1.0.1</a> conformant implementation is available in [MIVisionX Lite](https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/tree/openvx-1.0.1)

## AMD OpenVX Extensions

Expand Down Expand Up @@ -162,18 +162,18 @@ For the convenience of the developer, we here provide the setup script which wil
**usage:**

```
python3 MIVisionX-setup.py --directory [setup directory - optional (default:~/)]
--opencv [OpenCV Version - optional (default:3.4.0)]
--miopen [MIOpen Version - optional (default:2.11.0)]
--miopengemm[MIOpenGEMM Version - optional (default:1.1.5)]
--protobuf [ProtoBuf Version - optional (default:3.12.0)]
--rpp [RPP Version - optional (default:0.7)]
--ffmpeg [FFMPEG Installation - optional (default:no) [options:yes/no]]
--rocal [MIVisionX rocAL Dependency Install - optional (default:yes) [options:yes/no]]
--neural_net[MIVisionX Neural Net Dependency Install - optional (default:yes) [options:yes/no]]
--reinstall [Remove previous setup and reinstall (default:no)[options:yes/no]]
--backend [MIVisionX Dependency Backend - optional (default:OCL) [options:OCL/HIP]]
--rocm_path [ROCm Installation Path - optional (default:/opt/rocm) - ROCm Installation Required]
python MIVisionX-setup.py --directory [setup directory - optional (default:~/)]
kiritigowda marked this conversation as resolved.
Show resolved Hide resolved
--opencv [OpenCV Version - optional (default:3.4.0)]
--miopen [MIOpen Version - optional (default:2.11.0)]
--miopengemm[MIOpenGEMM Version - optional (default:1.1.5)]
--protobuf [ProtoBuf Version - optional (default:3.12.0)]
--rpp [RPP Version - optional (default:0.7)]
--ffmpeg [FFMPEG Installation - optional (default:no) [options:yes/no]]
--rocal [MIVisionX rocAL Dependency Install - optional (default:yes) [options:yes/no]]
--neural_net[MIVisionX Neural Net Dependency Install - optional (default:yes) [options:yes/no]]
--reinstall [Remove previous setup and reinstall (default:no)[options:yes/no]]
--backend [MIVisionX Dependency Backend - optional (default:OCL) [options:OCL/HIP]]
--rocm_path [ROCm Installation Path - optional (default:/opt/rocm) - ROCm Installation Required]
```
**Note:**
* **ROCm upgrade** with `sudo apt upgrade` requires the setup script **rerun**.
Expand Down Expand Up @@ -235,7 +235,7 @@ macOS [build instructions](https://github.com/GPUOpen-ProfessionalCompute-Librar
```

```
python3 MIVisionX-setup.py
python MIVisionX-setup.py
kiritigowda marked this conversation as resolved.
Show resolved Hide resolved
```

**Note:** MIVisionX has support for two GPU backends: **OPENCL** and **HIP**:
Expand Down Expand Up @@ -396,7 +396,7 @@ sudo docker run -it --device=/dev/kfd --device=/dev/dri --cap-add=SYS_RAWIO --de
+ Ubuntu - `18.04` / `20.04`
+ CentOS - `7` / `8`
+ SLES - `15-SP2`
* ROCm: rocm-dkms - `4.2.0.40200-21`
* ROCm: rocm-dkms - `4.3.1.40301-59`
* rocm-cmake - [rocm-4.2.0](https://github.com/RadeonOpenCompute/rocm-cmake/releases/tag/rocm-4.2.0)
* MIOpenGEMM - [1.1.5](https://github.com/ROCmSoftwarePlatform/MIOpenGEMM/releases/tag/1.1.5)
* MIOpen - [2.11.0](https://github.com/ROCmSoftwarePlatform/MIOpen/releases/tag/2.11.0)
Expand Down
23 changes: 18 additions & 5 deletions amd_openvx/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
<p align="center"><img width="30%" src="../docs/images/OpenVX_logo.png" /></p>

# AMD OpenVX

AMD OpenVX is a highly optimized open-source implementation of the [Khronos OpenVX](https://www.khronos.org/registry/vx/) computer vision specification. It allows for rapid prototyping as well as fast execution on a wide range of computer hardware, including small embedded x86 CPUs and large workstation discrete GPUs.
The Khronos OpenVX API offers a set of optimized primitives for low-level image processing, computer vision, and neural net operators. The API provides a simple method to write optimized code that is portable across multiple hardware vendors and platforms.

OpenVX allows for resource and execution abstractions, which enable hardware vendors to optimize their implementation for their platform. Performance portability across CPUs, GPUs, and special-function hardware are one of the design goals of the OpenVX specification.

OpenVX is used to build, verify, and coordinate computer vision and neural network graph executions. The graph abstraction enables OpenVX implementation to optimize execution for the underlying hardware. Using optimized OpenVX conformant implementation, software developers can spend more time on algorithmic innovations without worrying about the performance and portability of their applications.

The standard defines graph conventions and execution semantics to address the needs of the developers. The advantage of the graphical interface is the ability of the underlying conformant implementation to optimize the whole graph pipeline instead of specific functions.

OpenVX specification also defines the VXU or the immediate function library. VXU operators allow developers to use all the OpenVX operators as a directly callable C function without creating a graph first. Applications built using the VXU library do not benefit from the optimizations enabled by graph execution. The VXU library can be the simplest way to use OpenVX and is the first step in porting existing vision applications.

AMD OpenVX is a highly optimized open-source implementation of the [Khronos OpenVX 1.3](https://www.khronos.org/registry/OpenVX/specs/1.3/html/OpenVX_Specification_1_3.html) computer vision specification. It allows for rapid prototyping as well as fast execution on a wide range of computer hardware, including small embedded x86 CPUs and large workstation discrete GPUs.

The amd_openvx project consists of the following components:

Expand All @@ -16,11 +28,11 @@ The OpenVX framework provides a mechanism to add new vision functions to OpenVX

## Features

* The code is highly optimized for both x86 CPU and OpenCL for GPU
* The code is highly optimized for both x86 CPU and OpenCL/HIP for GPU
* Supported hardware spans the range from low power embedded APUs, laptops, desktops, and workstation graphics
* Supports `Windows` , `Linux` , and `macOS`
* Includes a “graph optimizer” that looks at the entire processing pipeline and removes/replaces/merges functions to improve performance and minimize bandwidth at runtime
* Scripting support allows for rapid prototyping, without re-compiling at production performance levels
* Scripting support with [RunVX](../utilities/runvx/README.md) allows for rapid prototyping, without re-compiling at production performance levels

## Pre-requisites

Expand All @@ -41,10 +53,11 @@ Build this project to generate AMD OpenVX library
* Install OpenCV with/without contrib [download](https://github.com/opencv/opencv/releases) for RunVX tool to support camera capture and image display (optional)
+ OpenCV_DIR environment variable should point to OpenCV/build folder
* Use amd_openvx/amd_openvx.sln to build for x64 platform
* If AMD GPU (or OpenCL) is not available, set build flag ENABLE_OPENCL=0 in openvx/openvx.vcxproj and runvx/runvx.vcxproj
* If AMD GPU (or OpenCL) is not available, set build flag `ENABLE_OPENCL=0`in openvx/openvx.vcxproj and runvx/runvx.vcxproj

**Note:** AMD GPU `HIP` backend is not supported on Windows

### Build using CMake

* Install CMake 3.0 or later
* Use CMake to configure and generate Makefile
* If AMD GPU (or OpenCL) is not available, use build flag -DCMAKE_DISABLE_FIND_PACKAGE_OpenCL=TRUE
3 changes: 2 additions & 1 deletion amd_openvx/openvx/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# AMD OpenVX library

AMD OpenVX library is a highly optimized open-source implementation of the [Khronos OpenVX](https://www.khronos.org/registry/vx/) computer vision specification.
AMD OpenVX library is a highly optimized open-source implementation of the [Khronos OpenVX 1.3](https://www.khronos.org/registry/OpenVX/specs/1.3/html/OpenVX_Specification_1_3.html) computer vision specification.


* Refer to [include/VX](include/VX) for Khronos OpenVX standard header files.
* Refer to [include/vx_ext_amd.h](include/vx_ext_amd.h) for vendor extensions in AMD OpenVX library.