mirror of
git://git.yoctoproject.org/meta-intel.git
synced 2025-07-19 12:59:03 +02:00
openvino-inference-engine: fix build with gcc13
Fix various issues when compiling with gcc13. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
This commit is contained in:
parent
c8fc88b7ed
commit
8220eccbbf
|
@ -0,0 +1,32 @@
|
|||
From 7cecc9138b89e1946e3e515727bb69b2ab119806 Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Trofimovich <slyich@gmail.com>
|
||||
Date: Thu, 26 May 2022 07:11:37 +0100
|
||||
Subject: [PATCH] add missing <cstdint> header inclusion (gcc-13 support)
|
||||
|
||||
Without the change ade build fails on this week's gcc-13 snapshot as:
|
||||
|
||||
[ 77%] Building CXX object sources/ade/CMakeFiles/ade.dir/source/topological_sort.cpp.o
|
||||
In file included from ade/sources/ade/include/ade/passes/topological_sort.hpp:17,
|
||||
from ade/sources/ade/source/topological_sort.cpp:7:
|
||||
ade/sources/ade/include/ade/typed_graph.hpp:101:10: error: 'uintptr_t' in namespace 'std' does not name a type
|
||||
101 | std::uintptr_t m_srcGraph;
|
||||
| ^~~~~~~~~
|
||||
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
|
||||
---
|
||||
sources/ade/include/ade/typed_graph.hpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/sources/ade/include/ade/typed_graph.hpp b/sources/ade/include/ade/typed_graph.hpp
|
||||
index d9676e6..8a27578 100644
|
||||
--- a/sources/ade/include/ade/typed_graph.hpp
|
||||
+++ b/sources/ade/include/ade/typed_graph.hpp
|
||||
@@ -9,6 +9,7 @@
|
||||
#ifndef ADE_TYPED_GRAPH_HPP
|
||||
#define ADE_TYPED_GRAPH_HPP
|
||||
|
||||
+#include <cstdint>
|
||||
#include <unordered_set>
|
||||
#include <string>
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
From aac55921864fa91fe8e394a25fc565f28ae5fc64 Mon Sep 17 00:00:00 2001
|
||||
From: Anuj Mittal <anuj.mittal@intel.com>
|
||||
Date: Tue, 30 May 2023 09:31:09 +0800
|
||||
Subject: [PATCH] fix build with gcc13
|
||||
|
||||
* Include the headers as per:
|
||||
https://gcc.gnu.org/gcc-13/porting_to.html
|
||||
|
||||
* Remove -Werror for:
|
||||
|git/src/plugins/intel_gpu/src/kernel_selector/jitter.h:129:28: error: 'virtual kernel_selector::JitDefinitions kernel_selector::JitConstant::GetDefinitions() const' was hidden [-Werror=overloaded-virtual=]
|
||||
| 129 | virtual JitDefinitions GetDefinitions() const = 0;
|
||||
| | ^~~~~~~~~~~~~~
|
||||
|
||||
* Fix:
|
||||
| /data/poky/build/tmp/work/x86-64-v3-poky-linux/openvino-inference-engine/2022.3.0-r0/git/src/inference/include/ie/ie_precision.hpp: In member function 'bool InferenceEngine::Precision::operator==(const InferenceEngine::Precision&) const':
|
||||
| /data/poky/build/tmp/work/x86-64-v3-poky-linux/openvino-inference-engine/2022.3.0-r0/git/src/inference/include/ie/ie_precision.hpp:153:36: error: ambiguous overload for 'operator==' (operand types are 'const InferenceEngine::Precision::ePrecision' and 'const InferenceEngine::Precision')
|
||||
| 153 | return precisionInfo.value == p && precisionInfo.bitsSize == p.precisionInfo.bitsSize &&
|
||||
| | ~~~~~~~~~~~~~~~~~~~ ^~ ~
|
||||
| | | |
|
||||
| | | const InferenceEngine::Precision
|
||||
| | const InferenceEngine::Precision::ePrecision
|
||||
| /data/poky/build/tmp/work/x86-64-v3-poky-linux/openvino-inference-engine/2022.3.0-r0/git/src/inference/include/ie/ie_precision.hpp:152:10: note: candidate: 'bool InferenceEngine::Precision::operator==(const InferenceEngine::Precision&) const' (reversed)
|
||||
| 152 | bool operator==(const Precision& p) const noexcept {
|
||||
| | ^~~~~~~~
|
||||
| /data/poky/build/tmp/work/x86-64-v3-poky-linux/openvino-inference-engine/2022.3.0-r0/git/src/inference/include/ie/ie_precision.hpp:153:36: note: candidate: 'operator==(InferenceEngine::Precision::ePrecision, InferenceEngine::Precision::ePrecision)' (built-in)
|
||||
| 153 | return precisionInfo.value == p && precisionInfo.bitsSize == p.precisionInfo.bitsSize &&
|
||||
| | ~~~~~~~~~~~~~~~~~~~~^~~~
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
|
||||
---
|
||||
src/common/itt/include/openvino/itt.hpp | 1 +
|
||||
src/common/preprocessing/ie_preprocess_gapi_kernels.hpp | 1 +
|
||||
src/common/util/include/openvino/util/file_util.hpp | 1 +
|
||||
src/inference/include/ie/ie_precision.hpp | 2 +-
|
||||
src/plugins/intel_gpu/CMakeLists.txt | 6 +++---
|
||||
.../intel_gpu/include/intel_gpu/runtime/device_info.hpp | 1 +
|
||||
6 files changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/common/itt/include/openvino/itt.hpp b/src/common/itt/include/openvino/itt.hpp
|
||||
index c978ca1b138..f01d59a652a 100644
|
||||
--- a/src/common/itt/include/openvino/itt.hpp
|
||||
+++ b/src/common/itt/include/openvino/itt.hpp
|
||||
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
+#include <cstdint>
|
||||
#include <openvino/function_name.hpp>
|
||||
#include <openvino/util/pp.hpp>
|
||||
#include <string>
|
||||
diff --git a/src/common/preprocessing/ie_preprocess_gapi_kernels.hpp b/src/common/preprocessing/ie_preprocess_gapi_kernels.hpp
|
||||
index dfbb182b7a0..0887cc60e34 100644
|
||||
--- a/src/common/preprocessing/ie_preprocess_gapi_kernels.hpp
|
||||
+++ b/src/common/preprocessing/ie_preprocess_gapi_kernels.hpp
|
||||
@@ -8,6 +8,7 @@
|
||||
# error non standalone GAPI
|
||||
# endif
|
||||
|
||||
+#include <cstdint>
|
||||
#include <tuple>
|
||||
|
||||
#include <opencv2/gapi/opencv_includes.hpp>
|
||||
diff --git a/src/common/util/include/openvino/util/file_util.hpp b/src/common/util/include/openvino/util/file_util.hpp
|
||||
index d2f2e00ff60..88e641526ab 100644
|
||||
--- a/src/common/util/include/openvino/util/file_util.hpp
|
||||
+++ b/src/common/util/include/openvino/util/file_util.hpp
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
+#include <cstdint>
|
||||
#include <fstream>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
diff --git a/src/inference/include/ie/ie_precision.hpp b/src/inference/include/ie/ie_precision.hpp
|
||||
index 48bdd945b13..96c29b73159 100644
|
||||
--- a/src/inference/include/ie/ie_precision.hpp
|
||||
+++ b/src/inference/include/ie/ie_precision.hpp
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
* @return `true` if values represent the same precisions, `false` otherwise
|
||||
*/
|
||||
bool operator==(const Precision& p) const noexcept {
|
||||
- return precisionInfo.value == p && precisionInfo.bitsSize == p.precisionInfo.bitsSize &&
|
||||
+ return precisionInfo.value == p.precisionInfo.value && precisionInfo.bitsSize == p.precisionInfo.bitsSize &&
|
||||
areSameStrings(precisionInfo.name, p.precisionInfo.name);
|
||||
}
|
||||
|
||||
diff --git a/src/plugins/intel_gpu/CMakeLists.txt b/src/plugins/intel_gpu/CMakeLists.txt
|
||||
index ab4d7618c30..4c93024eb3c 100644
|
||||
--- a/src/plugins/intel_gpu/CMakeLists.txt
|
||||
+++ b/src/plugins/intel_gpu/CMakeLists.txt
|
||||
@@ -34,9 +34,9 @@ set(INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
|
||||
add_subdirectory(thirdparty)
|
||||
|
||||
-if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
- ie_add_compiler_flags(-Werror)
|
||||
-endif()
|
||||
+#if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
+# ie_add_compiler_flags(-Werror)
|
||||
+#endif()
|
||||
|
||||
add_subdirectory(src/runtime)
|
||||
add_subdirectory(src/kernel_selector)
|
||||
diff --git a/src/plugins/intel_gpu/include/intel_gpu/runtime/device_info.hpp b/src/plugins/intel_gpu/include/intel_gpu/runtime/device_info.hpp
|
||||
index 0c5a7177d30..7119417185c 100644
|
||||
--- a/src/plugins/intel_gpu/include/intel_gpu/runtime/device_info.hpp
|
||||
+++ b/src/plugins/intel_gpu/include/intel_gpu/runtime/device_info.hpp
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
--
|
||||
2.37.3
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
include cstdint header for gcc13
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
|
||||
|
||||
diff --git a/src/gpu/jit/gemm/kernel_catalog.hpp b/src/gpu/jit/gemm/kernel_catalog.hpp
|
||||
index 8e6e1f3b6..3c8e29981 100644
|
||||
--- a/src/gpu/jit/gemm/kernel_catalog.hpp
|
||||
+++ b/src/gpu/jit/gemm/kernel_catalog.hpp
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
+#include <cstdint>
|
||||
|
||||
#include "gen_gemm_kernel_common.hpp"
|
||||
|
|
@ -14,6 +14,9 @@ SRC_URI = "git://github.com/openvinotoolkit/openvino.git;protocol=https;branch=r
|
|||
git://github.com/opencv/ade.git;protocol=https;destsuffix=git/thirdparty/ade;name=ade;nobranch=1 \
|
||||
file://fix-build.patch \
|
||||
file://cython-cmake.patch \
|
||||
file://7cecc9138b89e1946e3e515727bb69b2ab119806.patch;patchdir=thirdparty/ade \
|
||||
file://fix-build-with-gcc13.patch \
|
||||
file://onednn-fix-build-with-gcc13.patch;patchdir=src/plugins/intel_gpu/thirdparty/onednn_gpu \
|
||||
"
|
||||
|
||||
SRCREV = "0a5ca5375265f0f12cdaee68574030408dd1c352"
|
||||
|
|
Loading…
Reference in New Issue
Block a user