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

CI : OpenVX 1.3 Updates #594

Merged
merged 12 commits into from
Aug 25, 2021
6 changes: 3 additions & 3 deletions .jenkins/common.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def runCompileCommand(platform, project, jobName, boolean debug=false, boolean s
cd ../
echo Build MIVisionX HIP - ${buildTypeDir}
mkdir -p ${buildTypeDir}-hip && cd ${buildTypeDir}-hip
${cmake} ${buildTypeArg} -DBACKEND=HIP ../..
${cmake} ${buildTypeArg} -DBACKEND=HIP -DCMAKE_INSTALL_PREFIX=/opt/rocm/mivisionx/hip ../..
make -j\$(nproc)
sudo make package
sudo make install
Expand All @@ -69,9 +69,9 @@ def runTestCommand (platform, project) {

if (platform.jenkinsLabel.contains('centos') || platform.jenkinsLabel.contains('ubuntu')) {
conformaceCPU_OCL = 'AGO_DEFAULT_TARGET=CPU LD_LIBRARY_PATH=./lib ./bin/vx_test_conformance | tee OpenVX-CPU-Conformance-log-OCL-Backend.md'
conformaceOpenCL = 'AGO_DEFAULT_TARGET=GPU LD_LIBRARY_PATH=./lib ./bin/vx_test_conformance --filter=-HarrisCorners.*:-vxCanny.*:-*.ReplicateNode:-*.ImageContainmentRelationship:-*.MapRandomRemap:-*.OnRandomAndNatural:*.* | tee OpenVX-GPU-OPENCL-Conformance-log.md'
conformaceOpenCL = 'AGO_DEFAULT_TARGET=GPU LD_LIBRARY_PATH=./lib ./bin/vx_test_conformance | tee OpenVX-GPU-OPENCL-Conformance-log.md'
conformaceCPU_HIP = 'AGO_DEFAULT_TARGET=CPU LD_LIBRARY_PATH=./lib ./bin/vx_test_conformance | tee OpenVX-CPU-Conformance-log-HIP-Backend.md'
conformaceHIP = 'AGO_DEFAULT_TARGET=GPU LD_LIBRARY_PATH=./lib ./bin/vx_test_conformance --filter=-HarrisCorners.*:-vxCanny.*:-*.ReplicateNode:-*.ImageContainmentRelationship:-*.MapRandomRemap:-*.OnRandomAndNatural:*.* | tee OpenVX-GPU-HIP-Conformance-log.md'
conformaceHIP = 'AGO_DEFAULT_TARGET=GPU LD_LIBRARY_PATH=./lib ./bin/vx_test_conformance | tee OpenVX-GPU-HIP-Conformance-log.md'
moveFiles = 'mv *.md ../../'
}

Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ script:
after_success:
# code coverage tracking
- lcov --directory . --capture --output-file coverage.info
- lcov --remove coverage.info '/usr/*' --output-file coverage.info
- lcov --remove coverage.info '/usr/*' '*/runvx/*' --output-file coverage.info
- lcov --list coverage.info
- bash <(curl -s https://codecov.io/bash) || echo "codecov did not collect coverage reports"

Expand Down
12 changes: 5 additions & 7 deletions amd_openvx_extensions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ project(amd_openvx_extensions)

list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../amd_openvx/cmake)
find_package(OpenCV QUIET)
find_package(FFmpeg QUIET)
find_package(AMDRPP QUIET)

if(GPU_SUPPORT)
Expand Down Expand Up @@ -57,7 +56,8 @@ if(GPU_SUPPORT)
endif()

if(GPU_SUPPORT)
if (OpenCL_FOUND AND BUILD_OPENCL)
if ("${BACKEND}" STREQUAL "OPENCL" AND OpenCL_FOUND)
find_package(FFmpeg QUIET)
if(LOOM)
add_subdirectory(amd_loomsl)
message("-- ${Green}AMD OpenVX Loom Stich Library Extension -- amd_loomsl module added${ColourReset}")
Expand All @@ -76,17 +76,14 @@ if(GPU_SUPPORT)
else()
message(FATAL_ERROR "Unsupported HIP compiler")
endif()
if(FFMPEG_FOUND)
message("-- ${Red}WARNING:FFMPEG Found -- amd_media module excluded with HIP Backend${ColourReset}")
endif(FFMPEG_FOUND)
else()
message("-- ${Red}WARNING:GPU Support OpenCL/HIP Not Found -- amd_openvx_extensions modules for GPU excluded${ColourReset}")
endif()
endif(GPU_SUPPORT)

if (NEURAL_NET)
if(GPU_SUPPORT AND miopengemm_FOUND AND miopen_FOUND)
if (OpenCL_FOUND AND BUILD_OPENCL)
if ("${BACKEND}" STREQUAL "OPENCL" AND OpenCL_FOUND)
add_subdirectory(amd_nn)
message("-- ${Green}AMD OpenVX Neural Network Extension -- amd_nn module added with OpenCL backend${ColourReset}")
elseif("${BACKEND}" STREQUAL "HIP" AND HIP_FOUND)
Expand All @@ -104,8 +101,9 @@ endif()

if(AMDRPP_FOUND AND GPU_SUPPORT)
add_subdirectory(amd_rpp)
message("-- ${Green}AMD Radeon Performance Primitives -- amd_rpp module added with GPU Support${ColourReset}")
elseif(AMDRPP_FOUND AND "${BACKEND}" STREQUAL "CPU")
message("-- ${Red}WARNING:AMDRPP Found -- amd_rpp module excluded with CPU Backend${ColourReset}")
message("-- ${Red}WARNING:AMDRPP Found -- amd_rpp module excluded with CPU Only Backend${ColourReset}")
else()
message("-- ${Red}WARNING:AMDRPP Not Found -- amd_rpp module excluded${ColourReset}")
endif()
Expand Down
7 changes: 3 additions & 4 deletions amd_openvx_extensions/amd_nn/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ list(APPEND SOURCES


if(GPU_SUPPORT AND "${BACKEND}" STREQUAL "OPENCL" AND OpenCL_FOUND)
message("-- ${Green}AMD OpenVX Neural Network Extension -- BUILDING WITH OPENCL BACKEND${ColourReset}")
message("-- ${Green}amd_nn -- Building with OpenCL${ColourReset}")
set(ENABLE_OPENCL 1)
set(ENABLE_HIP 0)
add_definitions(-DENABLE_OPENCL=${ENABLE_OPENCL} -DENABLE_HIP=${ENABLE_HIP})
include_directories(${OpenCL_INCLUDE_DIRS} ${OpenCL_INCLUDE_DIRS}/Headers)
add_library(vx_nn SHARED ${SOURCES})
target_link_libraries(vx_nn openvx MIOpen miopengemm)
elseif (GPU_SUPPORT AND "${BACKEND}" STREQUAL "HIP" AND HIP_FOUND)
message("-- ${Green}AMD OpenVX Neural Network Extension -- BUILDING WITH HIP BACKEND${ColourReset}")
message("-- ${Green}amd_nn -- Building with HIP${ColourReset}")
set(ENABLE_OPENCL 0)
set(ENABLE_HIP 1)
add_definitions(-DENABLE_OPENCL=${ENABLE_OPENCL} -DENABLE_HIP=${ENABLE_HIP} -D__HIP_PLATFORM_HCC__)
Expand All @@ -126,8 +126,7 @@ elseif (GPU_SUPPORT AND "${BACKEND}" STREQUAL "HIP" AND HIP_FOUND)
set_target_properties(openvx PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_link_libraries(vx_nn openvx openvx_hip nn_hip MIOpen miopengemm ${HIP_LIBRARY})
else()
message("-- ${Red}AMD OpenVX Neural Network Extension -- OPENCL/HIP NOT FOUND${ColourReset}")
message("-- ${Red}AMD OpenVX Neural Network Extension module excluded {ColourReset}")
message("-- ${Red}WARNING:OpenCL/HIP Not Found -- amd_nn module excluded{ColourReset}")
endif()


Expand Down
7 changes: 3 additions & 4 deletions amd_openvx_extensions/amd_rpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ list(APPEND SOURCES
link_directories(${AMDRPP_LIBRARIES_DIR})

if(GPU_SUPPORT AND "${BACKEND}" STREQUAL "OPENCL" AND OpenCL_FOUND)
message("-- ${Green}AMD VX RPP -- BUILDING WITH OPENCL BACKEND${ColourReset}")
message("-- ${Green}amd_rpp -- Building with OpenCL${ColourReset}")
set(ENABLE_OPENCL 1)
set(ENABLE_HIP 0)
add_definitions(-DENABLE_OPENCL=${ENABLE_OPENCL} -DENABLE_HIP=${ENABLE_HIP} -DRPP_BACKEND_OPENCL=1)
include_directories(${OpenCL_INCLUDE_DIRS} ${OpenCL_INCLUDE_DIRS}/Headers)
add_library(vx_rpp SHARED ${SOURCES})
target_link_libraries(vx_rpp amd_rpp boost_filesystem boost_system ${OpenCL_LIBRARIES})
elseif (GPU_SUPPORT AND "${BACKEND}" STREQUAL "HIP" AND HIP_FOUND)
message("-- ${Green}AMD VX RPP -- BUILDING WITH HIP BACKEND${ColourReset}")
message("-- ${Green}amd_rpp -- Building with HIP${ColourReset}")
set(ENABLE_OPENCL 0)
set(ENABLE_HIP 1)
add_definitions(-DENABLE_OPENCL=${ENABLE_OPENCL} -DENABLE_HIP=${ENABLE_HIP} -DRPP_BACKEND_HIP=1 -D__HIP_PLATFORM_HCC__)
Expand All @@ -155,8 +155,7 @@ elseif (GPU_SUPPORT AND "${BACKEND}" STREQUAL "HIP" AND HIP_FOUND)
set_target_properties(openvx PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_link_libraries(vx_rpp amd_rpp boost_filesystem boost_system ${HIP_LIBRARY})
else()
message("-- ${Red}AMD VX RPP -- OPENCL/HIP NOT FOUND${ColourReset}")
message("-- ${Red}AMD VX RPP module excluded${ColourReset}")
message("-- ${Red}WARNING:OpenCL/HIP Not Found -- amd_rpp module excluded${ColourReset}")
endif()

install(TARGETS vx_rpp DESTINATION lib)
Expand Down
2 changes: 1 addition & 1 deletion utilities/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../amd_openvx/cmake)
if(GPU_SUPPORT)
if("${BACKEND}" STREQUAL "OPENCL")
find_package(OpenCL QUIET)
find_package(FFmpeg QUIET)
if(OpenCL_FOUND)
set(BUILD_OPENCL true)
else()
Expand All @@ -47,7 +48,6 @@ if(GPU_SUPPORT)
endif()
endif()

find_package(FFmpeg QUIET)
add_subdirectory(runvx)

if(OpenCL_FOUND AND BUILD_OPENCL)
Expand Down