-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[onnx] Update onnx to 1.16.2 and fix downstream #40067
Merged
BillyONeal
merged 26 commits into
microsoft:master
from
MonicaLiu0311:Dev/Monica/update_onnx
Oct 18, 2024
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
a8a7bdd
update to 1.4.2
d0c603d
update version
2b8ec26
Merge remote-tracking branch 'upstream/master' into HEAD
ras0219-msft 1f25f7e
Merge remote-tracking branch 'origin/master' into HEAD
BillyONeal 5aa230f
Merge branch 'master' of https://github.com/microsoft/vcpkg into Dev/…
MonicaLiu0311 f19e8cb
update onnx-optimizer to 0.3.19
6998e04
update version
0691914
fix-cmakelists.patch
fe2390a
update git-tree
72d38f6
fix dependency onnx
466c38c
update version
a33c993
update to 1.16.2
47138f7
update version
2b8b422
fix dependency onnx
2143cc6
update version
6c35e65
fix feature pybind11
47fd86f
update git-tree
47ae84d
fix onnx-optimizer
6a85014
update git-tree
f9802fc
format
0e3d1dc
resolve conflict
8c970b5
update version
24b811c
Merge branch 'master' into Dev/Monica/update_onnx
MonicaLiu0311 e9794c2
fix cmake-fixes.patch
83f8e8d
update git-tree
df7e84e
Merge branch 'Dev/Monica/update_onnx' of https://github.com/MonicaLiu…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 0063385..64458ef 100644 | ||
index 0063385..f1522bc 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -10,6 +10,15 @@ project(onnx_optimizer C CXX) | ||
|
@@ -33,6 +33,15 @@ index 0063385..64458ef 100644 | |
|
||
file(READ "${PROJECT_SOURCE_DIR}/VERSION_NUMBER" ONNX_OPTIMIZER_VERSION) | ||
string(STRIP "${ONNX_OPTIMIZER_VERSION}" ONNX_OPTIMIZER_VERSION) | ||
@@ -41,7 +48,7 @@ file(GLOB onnx_opt_srcs "onnxoptimizer/*.cc" | ||
list(REMOVE_ITEM onnx_opt_srcs "${PROJECT_SOURCE_DIR}/onnxoptimizer/cpp2py_export.cc") | ||
|
||
onnxopt_add_library(onnx_optimizer ${onnx_opt_srcs}) | ||
-target_link_libraries(onnx_optimizer PUBLIC ${ONNX_TARGET_NAME}) | ||
+target_link_libraries(onnx_optimizer PUBLIC ONNX::onnx ONNX::onnx_proto) | ||
target_include_directories(onnx_optimizer PUBLIC | ||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}> | ||
$<INSTALL_INTERFACE:include> | ||
@@ -70,7 +77,7 @@ if(BUILD_ONNX_PYTHON) | ||
set(PY_EXT_SUFFIX ".so") | ||
endif() | ||
|
@@ -73,3 +82,17 @@ index 6cca9f3..9d79f1a 100644 | |
# Poor man's FetchContent | ||
function(add_subdirectory_if_no_target dir target) | ||
if (NOT TARGET ${target}) | ||
diff --git a/cmake/ONNXOptimizerConfig.cmake.in b/cmake/ONNXOptimizerConfig.cmake.in | ||
index 72dcc88..c5639c8 100644 | ||
--- a/cmake/ONNXOptimizerConfig.cmake.in | ||
+++ b/cmake/ONNXOptimizerConfig.cmake.in | ||
@@ -3,6 +3,9 @@ | ||
# ONNX_OPTIMIZER_INCLUDE_DIRS - include directories for onnx optimizer | ||
# as well as ONNX Optimizer targets for other cmake libraries to use. | ||
|
||
+include(CMakeFindDependencyMacro) | ||
+find_dependency(onnx CONFIG) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also needs |
||
+ | ||
# library version information | ||
set(ONNX_OPTIMIZER_VERSION "@ONNX_OPTIMIZER_VERSION@") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff --git a/src/frontends/onnx/onnx_common/CMakeLists.txt b/src/frontends/onnx/onnx_common/CMakeLists.txt | ||
index d63bce4..116a6e3 100644 | ||
--- a/src/frontends/onnx/onnx_common/CMakeLists.txt | ||
+++ b/src/frontends/onnx/onnx_common/CMakeLists.txt | ||
@@ -30,7 +30,7 @@ target_include_directories(${TARGET_NAME} | ||
|
||
target_link_libraries(${TARGET_NAME} PRIVATE openvino::runtime openvino::util) | ||
|
||
-ov_link_system_libraries(${TARGET_NAME} PUBLIC onnx_proto onnx) | ||
+ov_link_system_libraries(${TARGET_NAME} PUBLIC ONNX::onnx ONNX::onnx_proto) | ||
|
||
ov_add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME}) | ||
|
||
diff --git a/thirdparty/dependencies.cmake b/thirdparty/dependencies.cmake | ||
index 24c4940..8ea7d12 100644 | ||
--- a/thirdparty/dependencies.cmake | ||
+++ b/thirdparty/dependencies.cmake | ||
@@ -479,7 +479,7 @@ endif() | ||
# | ||
|
||
if(ENABLE_OV_ONNX_FRONTEND) | ||
- find_package(ONNX 1.15.0 QUIET COMPONENTS onnx onnx_proto NO_MODULE) | ||
+ find_package(ONNX CONFIG REQUIRED) | ||
|
||
if(ONNX_FOUND) | ||
# conan and vcpkg create imported targets 'onnx' and 'onnx_proto' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vendored dependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This patch line actually comes from: 36246/files , let's ask @Neumann-A to get the answer. I just organized the patches for
Dependencies.cmake
here because they are too scattered and a bit confusing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree this looks broken, but it isn't a change from the status quo, since it just applies more-fixes.patch on top of this one.