Skip to content

Commit 1dcbf37

Browse files
committed
two additional patches to fix compile errors on linux x86-64
1 parent 5ab553d commit 1dcbf37

3 files changed

Lines changed: 48 additions & 0 deletions

File tree

onnxruntime/cppbuild.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ sedinplace 's/MLAS_CPUIDINFO::GetCPUIDInfo().HasArmNeon_I8MM()/false/g' onnxrunt
122122
# work around toolchain issues on Mac and Windows
123123
patch -p1 < ../../../onnxruntime.patch
124124
git apply --recount ../../../onnxruntime-openvino-no-format.patch
125+
git apply --recount ../../../onnxruntime-openvino-gcc11.patch
126+
git apply --recount ../../../onnxruntime-openvino-gcc13.patch
125127
#patch -p1 < ../../../onnxruntime-cuda.patch # https://github.com/microsoft/onnxruntime/pull/22316
126128
#patch -p1 < ../../../onnxruntime-windows.patch # https://github.com/microsoft/onnxruntime/pull/7883
127129
sedinplace '/--Werror/d' cmake/CMakeLists.txt
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/onnxruntime/core/providers/openvino/qdq_transformations/qdq_scales_fix.cc b/onnxruntime/core/providers/openvino/qdq_transformations/qdq_scales_fix.cc
2+
index 5de7607a87..a03a8b1c6e 100644
3+
--- a/onnxruntime/core/providers/openvino/qdq_transformations/qdq_scales_fix.cc
4+
+++ b/onnxruntime/core/providers/openvino/qdq_transformations/qdq_scales_fix.cc
5+
@@ -563,7 +563,9 @@ struct CustomGraph {
6+
if (!found) {
7+
// Connect the last valid node to the graph output
8+
- for (auto node : std::ranges::reverse_view(original_graph.Nodes())) {
9+
+ auto graph_nodes = original_graph.Nodes();
10+
+ for (auto node_it = graph_nodes.rbegin(); node_it != graph_nodes.rend(); ++node_it) {
11+
+ auto node = *node_it;
12+
if (!node->OutputDefs().empty()) {
13+
const auto& name = (*node->OutputDefs().begin())->Name();
14+
auto& node_arg = original_graph.GetOrCreateNodeArg(name, output->TypeAsProto());
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
diff --git a/onnxruntime/core/providers/openvino/ov_versions/utils.cc b/onnxruntime/core/providers/openvino/ov_versions/utils.cc
2+
index dd43f856e0..6a34827b1a 100644
3+
--- a/onnxruntime/core/providers/openvino/ov_versions/utils.cc
4+
+++ b/onnxruntime/core/providers/openvino/ov_versions/utils.cc
5+
@@ -9,13 +9,11 @@
6+
#elif __GNUC__
7+
#pragma GCC diagnostic push
8+
#pragma GCC diagnostic ignored "-Wunused-parameter"
9+
-#endif
10+
-
11+
-#if defined(_MSC_VER)
12+
-#pragma warning(default : 4244 4245)
13+
-#elif __GNUC__
14+
-#pragma GCC diagnostic pop
15+
+#if __GNUC__ >= 13
16+
+#pragma GCC diagnostic ignored "-Wfree-nonheap-object"
17+
+#endif
18+
#endif
19+
20+
namespace onnxruntime {
21+
namespace openvino_ep {
22+
23+
@@ -1080,3 +1078,10 @@ void GetInputsOutputsOfCluster(const GraphViewer& graph_viewer, const std::vecto
24+
25+
} // namespace openvino_ep
26+
} // namespace onnxruntime
27+
+
28+
+#if defined(_MSC_VER)
29+
+#pragma warning(default : 4244 4245)
30+
+#elif __GNUC__
31+
+#pragma GCC diagnostic pop
32+
+#endif

0 commit comments

Comments
 (0)