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

VX_NN - Updates (#801) #804

Merged
merged 1 commit into from
Apr 6, 2022
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
2 changes: 1 addition & 1 deletion amd_openvx_extensions/amd_nn/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,5 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2 -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2 -std=gnu++14")
endif()
4 changes: 2 additions & 2 deletions model_compiler/python/nnir_to_clib.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def generateCMakeFiles(graph,outputFolder):
link_directories (/opt/rocm/mivisionx/lib)
list(APPEND SOURCES mvmodule.cpp)
add_library(mv_deploy SHARED ${SOURCES})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2 -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2 -std=gnu++14")
target_compile_definitions(mv_deploy PRIVATE ENABLE_MVDEPLOY=1)
target_link_libraries(mv_deploy openvx vx_nn pthread ${CMAKE_DL_LIBS})
install (TARGETS mv_deploy DESTINATION lib)
Expand Down Expand Up @@ -268,7 +268,7 @@ def generateCMakeExtras(graph,outputFolder):
include_directories (/opt/rocm/mivisionx/include ../)
link_directories (/opt/rocm/mivisionx/lib)
add_library(${PROJECT_NAME} SHARED mv_extras_postproc.cpp)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2 -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2 -std=gnu++14")
if (OpenCV_FOUND)
target_compile_definitions(mv_extras PUBLIC ENABLE_OPENCV=1)
include_directories(${OpenCV_INCLUDE_DIRS})
Expand Down
6 changes: 2 additions & 4 deletions model_compiler/python/nnir_to_openvx.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def generateCMakeFiles(graph,outputFolder):

list(APPEND SOURCES annmodule.cpp)
add_library(${PROJECT_NAME} SHARED ${SOURCES})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2 -mf16c -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2 -mf16c -std=gnu++14")

if (OPENVX_BACKEND_OPENCL_FOUND)
target_link_libraries(${PROJECT_NAME} openvx vx_nn pthread ${OpenCL_LIBRARIES})
Expand Down Expand Up @@ -185,7 +185,7 @@ def generateCMakeFiles(graph,outputFolder):
endif()

add_library(annpython SHARED annpython.cpp)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2 -mf16c -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2 -mf16c -std=gnu++14")

if (OPENVX_BACKEND_OPENCL_FOUND)
target_link_libraries(annpython ${PROJECT_NAME} openvx vx_nn pthread ${OpenCL_LIBRARIES})
Expand Down Expand Up @@ -1987,8 +1987,6 @@ def generateTestCPP(graph,argmaxOutput,fileName,virtual_tensor_flag):

#if ENABLE_OPENCV
#include <opencv2/opencv.hpp>
#include <opencv/cv.h>
#include <opencv/highgui.h>
using namespace cv;
#if USE_OPENCV_4
#define CV_LOAD_IMAGE_COLOR IMREAD_COLOR
Expand Down