Skip to content
This repository was archived by the owner on Feb 16, 2019. It is now read-only.

Commit bbb599f

Browse files
authored
Merge pull request #52 from GPUOpen-ProfessionalCompute-Libraries/develop
release 0.9.7
2 parents e2ca803 + 102af14 commit bbb599f

32 files changed

+1262
-258
lines changed

CMakeLists.txt

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,22 @@
1919
# THE SOFTWARE.
2020

2121
cmake_minimum_required (VERSION 2.8)
22-
project(amdovx)
22+
project(amdovx-core)
23+
24+
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
25+
26+
find_package(OpenCL QUIET)
27+
find_package(OpenCV QUIET)
28+
29+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
30+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
31+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
32+
33+
file(COPY examples DESTINATION ${CMAKE_BINARY_DIR})
2334

2435
add_subdirectory(openvx)
2536
add_subdirectory(runvx)
26-
add_subdirectory(runcl)
37+
38+
if(OpenCL_FOUND)
39+
add_subdirectory(runcl)
40+
endif(OpenCL_FOUND)

README.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
# AMD OpenVX (AMDOVX)
2-
AMD OpenVX (beta preview) 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.
1+
# AMD OpenVX (AMDOVX)
2+
AMD OpenVX (beta) 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.
33

44
The amdovx-core project consists of two components:
55
* [OpenVX](openvx/README.md): AMD OpenVX library
66
* [RunVX](runvx/README.md): command-line utility to execute OpenVX graph described in GDF text file
7+
* [RunCL](runcl/README.md): command-line utility to build, execute, and debug OpenCL programs
78

89
The OpenVX framework provides a mechanism to add new vision functions to OpenVX by 3rd party vendors. Look into github [amdovx-modules](https://github.com/GPUOpen-ProfessionalCompute-Libraries/amdovx-modules) project for additional OpenVX modules and utilities.
9-
* [vx_loomsl](https://github.com/GPUOpen-ProfessionalCompute-Libraries/amdovx-modules/tree/master/vx_loomsl/README.md): Radeon LOOM stitching library for live 360 degree video applications
10-
* [loom_shell](https://github.com/GPUOpen-ProfessionalCompute-Libraries/amdovx-modules/tree/master/utils/loom_shell/README.md): an interpreter to prototype 360 degree video stitching applications using a script
11-
* [vx_ext_cv](https://github.com/GPUOpen-ProfessionalCompute-Libraries/amdovx-modules/tree/master/vx_ext_cv/README.md): OpenVX module that implemented a mechanism to access OpenCV functionality as OpenVX kernels
10+
* **vx_nn**: OpenVX neural network module that was built on top of [MIOpen](https://github.com/ROCmSoftwarePlatform/MIOpen)
11+
* **vx_loomsl**: Radeon LOOM stitching library for live 360 degree video applications
12+
* **loom_shell**: an interpreter to prototype 360 degree video stitching applications using a script
13+
* **vx_opencv**: OpenVX module that implemented a mechanism to access OpenCV functionality as OpenVX kernels
1214

1315
This software is provided under a MIT-style license, see the file COPYRIGHT.txt for details.
1416

@@ -21,26 +23,29 @@ This software is provided under a MIT-style license, see the file COPYRIGHT.txt
2123

2224
## Pre-requisites
2325
* CPU: SSE4.1 or above CPU, 64-bit.
24-
* GPU: Radeon R7 Series or above (Kaveri+ APU), Radeon 3xx Series or above (optional)
25-
* DRIVER: AMD Catalyst 15.7 or higher (version 15.20) with OpenCL 2.0 runtimes
26-
* AMD APP SDK 3.0 [download](http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/).
26+
* GPU: Radeon Professional Graphics Cards or Vega Family of Products (16GB required for vx_loomsl and vx_nn libraries)
27+
* Windows: install the latest drivers and OpenCL SDK [download](https://github.com/GPUOpen-LibrariesAndSDKs/OCL-SDK/releases)
28+
* Linux: install [ROCm](https://rocm.github.io/ROCmInstall.html)
29+
* OpenCV 3 (optional) [download](https://github.com/opencv/opencv/releases) for RunVX
30+
* Set OpenCV_DIR environment variable to OpenCV/build folder
2731

2832
## Build Instructions
2933
Build this project to generate AMD OpenVX library and RunVX executable.
3034
* Refer to [openvx/include/VX](openvx/include/VX) for Khronos OpenVX standard header files.
3135
* Refer to [openvx/include/vx_ext_amd.h](openvx/include/vx_ext_amd.h) for vendor extensions in AMD OpenVX library.
3236
* Refer to [runvx/README.md](runvx/README.md) for RunVX details.
37+
* Refer to [runcl/README.md](runcl/README.md) for RunCL details.
3338

3439
### Build using Visual Studio Professional 2013 on 64-bit Windows 10/8.1/7
35-
* Install OpenCV 3.0 [download](http://opencv.org/downloads.html) for RunVX tool to support camera capture and image display
40+
* Install OpenCV 3 with contrib [download](https://github.com/opencv/opencv/releases) for RunVX tool to support camera capture and image display (optional)
3641
* OpenCV_DIR environment variable should point to OpenCV/build folder
3742
* Use amdovx-core/amdovx.sln to build for x64 platform
38-
* If AMD GPU (or OpenCL 2.0) is not available, set build flag ENABLE_OPENCL=0 in openvx/openvx.vcxproj and runvx/runvx.vcxproj.
43+
* If AMD GPU (or OpenCL) is not available, set build flag ENABLE_OPENCL=0 in openvx/openvx.vcxproj and runvx/runvx.vcxproj.
3944

4045
### Build using CMake
4146
* Install CMake 2.8 or newer [download](http://cmake.org/download/).
42-
* Install OpenCV 3.0 [download](https://github.com/opencv/opencv/releases/tag/3.0.0) for RunVX tool to support camera capture and image display
47+
* Install OpenCV 3 with contrib [download](https://github.com/opencv/opencv/releases) for RunVX tool to support camera capture and image display (optional)
4348
* OpenCV_DIR environment variable should point to OpenCV/build folder
4449
* Install libssl-dev on linux (optional)
4550
* Use CMake to configure and generate Makefile
46-
* If AMD GPU (or OpenCL 2.0) is not available, use build flag -DCMAKE_DISABLE_FIND_PACKAGE_OpenCL=TRUE.
51+
* If AMD GPU (or OpenCL) is not available, use build flag -DCMAKE_DISABLE_FIND_PACKAGE_OpenCL=TRUE.

cmake/FindOpenCL.cmake

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
################################################################################
2+
#
3+
# MIT License
4+
#
5+
# Copyright (c) 2017 Advanced Micro Devices, Inc.
6+
#
7+
# Permission is hereby granted, free of charge, to any person obtaining a copy
8+
# of this software and associated documentation files (the "Software"), to deal
9+
# in the Software without restriction, including without limitation the rights
10+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
# copies of the Software, and to permit persons to whom the Software is
12+
# furnished to do so, subject to the following conditions:
13+
#
14+
# The above copyright notice and this permission notice shall be included in all
15+
# copies or substantial portions of the Software.
16+
#
17+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
# SOFTWARE.
24+
#
25+
################################################################################
26+
find_path(OPENCL_INCLUDE_DIRS
27+
NAMES OpenCL/cl.h CL/cl.h
28+
HINTS
29+
${OPENCL_ROOT}/include
30+
$ENV{AMDAPPSDKROOT}/include
31+
$ENV{CUDA_PATH}/include
32+
PATHS
33+
/usr/include
34+
/usr/local/include
35+
/usr/local/cuda/include
36+
/opt/cuda/include
37+
/opt/rocm/opencl/include
38+
DOC "OpenCL header file path"
39+
)
40+
mark_as_advanced( OPENCL_INCLUDE_DIRS )
41+
42+
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
43+
find_library( OPENCL_LIBRARIES
44+
NAMES OpenCL
45+
HINTS
46+
${OPENCL_ROOT}/lib
47+
$ENV{AMDAPPSDKROOT}/lib
48+
$ENV{CUDA_PATH}/lib
49+
DOC "OpenCL dynamic library path"
50+
PATH_SUFFIXES x86_64 x64 x86_64/sdk
51+
PATHS
52+
/usr/lib
53+
/usr/local/cuda/lib
54+
/opt/cuda/lib
55+
/opt/rocm/opencl/lib
56+
)
57+
else( )
58+
find_library( OPENCL_LIBRARIES
59+
NAMES OpenCL
60+
HINTS
61+
${OPENCL_ROOT}/lib
62+
$ENV{AMDAPPSDKROOT}/lib
63+
$ENV{CUDA_PATH}/lib
64+
DOC "OpenCL dynamic library path"
65+
PATH_SUFFIXES x86 Win32
66+
67+
PATHS
68+
/usr/lib
69+
/usr/local/cuda/lib
70+
/opt/cuda/lib
71+
)
72+
endif( )
73+
mark_as_advanced( OPENCL_LIBRARIES )
74+
75+
include( FindPackageHandleStandardArgs )
76+
find_package_handle_standard_args( OPENCL DEFAULT_MSG OPENCL_LIBRARIES OPENCL_INCLUDE_DIRS )
77+
78+
set(OpenCL_FOUND ${OPENCL_FOUND} CACHE INTERNAL "")
79+
set(OpenCL_LIBRARIES ${OPENCL_LIBRARIES} CACHE INTERNAL "")
80+
set(OpenCL_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS} CACHE INTERNAL "")
81+
82+
if( NOT OPENCL_FOUND )
83+
message( STATUS "FindOpenCL looked for libraries named: OpenCL" )
84+
endif()

openvx/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ if( POLICY CMP0054 )
7777
cmake_policy( SET CMP0054 OLD )
7878
endif()
7979
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
80-
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT /DVX_API_ENTRY=__declspec(dllexport)")
81-
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd /DVX_API_ENTRY=__declspec(dllexport)")
80+
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD /DVX_API_ENTRY=__declspec(dllexport)")
81+
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd /DVX_API_ENTRY=__declspec(dllexport)")
8282
else()
8383
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2 -std=c++11")
8484
target_link_libraries(openvx dl m)

0 commit comments

Comments
 (0)