Fixed compilation with gcc-12 (#13983)
* Fixed compilation with gcc-12 * Made python to be a mandatory dependency for gpu plugin * Apply suggestions from code review
This commit is contained in:
parent
fd961d6e56
commit
20419905c3
@ -81,8 +81,4 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$")
|
||||
set(OV_COMPILER_IS_CLANG ON)
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER MATCHES ".*conda.*")
|
||||
set(OV_COMPILER_IS_CONDA ON)
|
||||
endif()
|
||||
|
||||
get_property(OV_GENERATOR_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
|
@ -25,7 +25,7 @@ macro(ie_avx512_core_optimization_flags flags)
|
||||
set(${flags} -xCORE-AVX512)
|
||||
else()
|
||||
set(${flags} -mavx512f -mavx512bw -mavx512dq -mfma)
|
||||
if(OV_COMPILER_IS_CONDA)
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12)
|
||||
list(APPEND ${flags} -Wno-error=maybe-uninitialized -Wno-maybe-uninitialized)
|
||||
endif()
|
||||
endif()
|
||||
|
@ -56,7 +56,7 @@ function(ie_add_onednn)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG)
|
||||
ie_add_compiler_flags(-Wno-undef)
|
||||
ie_add_compiler_flags(-Wno-missing-declarations)
|
||||
if(OV_COMPILER_IS_CONDA)
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12 AND CMAKE_COMPILER_IS_GNUCXX)
|
||||
ie_add_compiler_flags(-Wno-error=array-bounds)
|
||||
ie_add_compiler_flags(-Wno-error=stringop-overflow=)
|
||||
endif()
|
||||
|
@ -4,12 +4,7 @@
|
||||
|
||||
set(TARGET_NAME "openvino_intel_gpu_kernels")
|
||||
|
||||
find_host_package(PythonInterp 3 QUIET)
|
||||
if(NOT PYTHONINTERP_FOUND)
|
||||
message(WARNING "[clDNN] Project requires Python 3.x interpreter to build (with python loader). CMake could not detect it correctly.
|
||||
If you have installed this interpreter, please disregard this warning or specify PYTHON_EXECUTABLE in CMake command-line."
|
||||
)
|
||||
endif()
|
||||
find_host_package(PythonInterp 3 REQUIRED)
|
||||
|
||||
file(GLOB_RECURSE LIBRARY_SRC
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/*.h"
|
||||
@ -81,13 +76,13 @@ set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_REL
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE setupapi)
|
||||
elseif((NOT ANDROID) AND (UNIX))
|
||||
elseif((NOT ANDROID) AND UNIX)
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE pthread)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(TUNING_CACHE_PATH "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$<CONFIGURATION>")
|
||||
else((NOT ANDROID) AND (UNIX))
|
||||
else()
|
||||
set(TUNING_CACHE_PATH "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/")
|
||||
endif()
|
||||
|
||||
|
@ -23,8 +23,11 @@ if(ENABLE_ONEDNN_FOR_GPU)
|
||||
execute_process(COMMAND git apply --verbose ../onednn_gpu.patch
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/onednn_gpu")
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
ie_add_compiler_flags(-Wno-undef -Wno-suggest-override -Wno-missing-declarations)
|
||||
if(OV_COMPILER_IS_CONDA)
|
||||
ie_add_compiler_flags(-Wno-undef -Wno-missing-declarations)
|
||||
if(SUGGEST_OVERRIDE_SUPPORTED)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-suggest-override")
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12)
|
||||
ie_add_compiler_flags(-Wno-error=array-bounds -Wno-error=stringop-overflow= -Wno-error=unused-result)
|
||||
endif()
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user