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

[onnx] Update onnx to 1.16.2 and fix downstream #40067

Merged
merged 26 commits into from
Oct 18, 2024

Conversation

MonicaLiu0311
Copy link
Contributor

@MonicaLiu0311 MonicaLiu0311 commented Jul 24, 2024

Fixes #39891.

onnx

Update to 1.16.2.

The usage test passed on x64-windows (header files found):

onnx provides CMake targets:

  # this is heuristically generated, and may not be correct
  find_package(ONNX CONFIG REQUIRED)
  target_link_libraries(main PRIVATE ONNX::onnx ONNX::onnx_proto)

onnx-optimizer

Update to 0.3.19. Fix dependency onnx and remove the outdated patch remove-outdate-headers.patch.

The usage test passed on x64-windows (header files found):

onnx provides CMake targets:

  # this is heuristically generated, and may not be correct
  find_package(ONNX CONFIG REQUIRED)
  target_link_libraries(main PRIVATE ONNX::onnx ONNX::onnx_proto)

openvino

Fix default-feature onnx:

FAILED: src/frontends/onnx/onnx_common/CMakeFiles/openvino_onnx_common.dir/src/parser.cpp.obj 
C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1441~1.341\bin\Hostx64\x64\cl.exe   /TP -DIN_OV_COMPONENT -DOV_BUILD_POSTFIX=\"d\" -DOV_NATIVE_PARENT_PROJECT_ROOT_DIR=\"2024.3.0-38b00ca3fb.clean\" -DOV_THREAD=OV_THREAD_TBB -DTBB_PREVIEW_WAITING_FOR_WORKERS=1 -ID:\b\openvino\src\2024.3.0-38b00ca3fb.clean\src\frontends\onnx\onnx_common\include -ID:\b\openvino\src\2024.3.0-38b00ca3fb.clean\src\frontends\onnx\onnx_common\src -ID:\b\openvino\src\2024.3.0-38b00ca3fb.clean\src\core\include -ID:\b\openvino\src\2024.3.0-38b00ca3fb.clean\src\frontends\common\include -ID:\b\openvino\src\2024.3.0-38b00ca3fb.clean\src\inference\include -ID:\b\openvino\src\2024.3.0-38b00ca3fb.clean\src\common\util\include -external:ID:\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /GR /EHsc /MP  /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS /EHsc /Gy /W3 /bigobj /MP /wd4251 /wd4275 /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1  -std:c++14 -MDd /d1trimfile:D:\b\openvino\src\2024.3.0-38b00ca3fb.clean\ /d1trimfile:D:/b/openvino/src/2024.3.0-38b00ca3fb.clean/ /showIncludes /Fosrc\frontends\onnx\onnx_common\CMakeFiles\openvino_onnx_common.dir\src\parser.cpp.obj /FdD:\b\openvino\src\2024.3.0-38b00ca3fb.clean\bin\intel64\Debug\ /FS -c D:\b\openvino\src\2024.3.0-38b00ca3fb.clean\src\frontends\onnx\onnx_common\src\parser.cpp
D:\installed\x64-windows\include\onnx/onnx_pb.h(53): fatal error C1083: Cannot open include file: 'onnx/onnx.pb.h': No such file or directory

libtorch

Fix dependency onnx and clean up confusion regarding Dependencies.cmake patches.

FAILED: bin/torch_cpu.dll lib/torch_cpu.lib 
C:\Windows\system32\cmd.exe /C "cd . && D:\downloads\tools\cmake-3.29.2-windows\cmake-3.29.2-windows-i386\bin\cmake.exe -E vs_link_dll --intdir=caffe2\CMakeFiles\torch_cpu.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1441~1.341\bin\Hostx64\x64\link.exe  @CMakeFiles\torch_cpu.rsp  /out:bin\torch_cpu.dll /implib:lib\torch_cpu.lib /pdb:bin\torch_cpu.pdb /dll /version:0.0 /machine:x64 /ignore:4049 /ignore:4217 /ignore:4099 /nologo    /debug /INCREMENTAL:NO  -WHOLEARCHIVE:D:/b/libtorch/x64-windows-dbg/lib/caffe2_protos.lib -WHOLEARCHIVE:D:/b/libtorch/x64-windows-dbg/lib/Caffe2_perfkernels_avx.lib -WHOLEARCHIVE:D:/b/libtorch/x64-windows-dbg/lib/Caffe2_perfkernels_avx2.lib -WHOLEARCHIVE:D:/b/libtorch/x64-windows-dbg/lib/Caffe2_perfkernels_avx512.lib && cd ."
LINK: command "C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1441~1.341\bin\Hostx64\x64\link.exe @CMakeFiles\torch_cpu.rsp /out:bin\torch_cpu.dll /implib:lib\torch_cpu.lib /pdb:bin\torch_cpu.pdb /dll /version:0.0 /machine:x64 /ignore:4049 /ignore:4217 /ignore:4099 /nologo /debug /INCREMENTAL:NO -WHOLEARCHIVE:D:/b/libtorch/x64-windows-dbg/lib/caffe2_protos.lib -WHOLEARCHIVE:D:/b/libtorch/x64-windows-dbg/lib/Caffe2_perfkernels_avx.lib -WHOLEARCHIVE:D:/b/libtorch/x64-windows-dbg/lib/Caffe2_perfkernels_avx2.lib -WHOLEARCHIVE:D:/b/libtorch/x64-windows-dbg/lib/Caffe2_perfkernels_avx512.lib /MANIFEST:EMBED,ID=2" failed (exit code 1181) with the following output:
LINK : fatal error LNK1181: cannot open input file 'onnx_proto.lib
  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download.
  • The "supports" clause reflects platforms that may be fixed by this new version.
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

@MonicaLiu0311 MonicaLiu0311 added info:internal This PR or Issue was filed by the vcpkg team. category:port-update The issue is with a library, which is requesting update new revision labels Jul 24, 2024
@MonicaLiu0311 MonicaLiu0311 added the category:port-bug The issue is with a library, which is something the port should already support label Jul 26, 2024
@MonicaLiu0311 MonicaLiu0311 changed the title [onnx] Update to 1.16.1 [onnx] Update to 1.16.2 Sep 25, 2024
@MonicaLiu0311 MonicaLiu0311 changed the title [onnx] Update to 1.16.2 [onnx] Update onnx to 1.16.2 and fix downstream Sep 27, 2024
@MonicaLiu0311 MonicaLiu0311 marked this pull request as ready for review September 27, 2024 10:00
LilyWangLL
LilyWangLL previously approved these changes Sep 29, 2024
@LilyWangLL LilyWangLL added the info:reviewed Pull Request changes follow basic guidelines label Sep 29, 2024
Copy link
Contributor

@JavierMatosD JavierMatosD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @MonicaLiu0311, Sorry, I didn't realize you were also editing openvino here when I merged #41077

Please resolve the merge conflicts and mark "ready for review"

@JavierMatosD JavierMatosD marked this pull request as draft September 30, 2024 22:11
@MonicaLiu0311 MonicaLiu0311 marked this pull request as ready for review October 9, 2024 02:14
+ find_package(CUDNN REQUIRED)
set(CUDNN_FRONTEND_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/../third_party/cudnn_frontend/include)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vendored dependency?

Copy link
Contributor Author

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.

Copy link
Member

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.

@JavierMatosD JavierMatosD marked this pull request as draft October 9, 2024 18:18
@MonicaLiu0311 MonicaLiu0311 marked this pull request as ready for review October 16, 2024 06:34
# as well as ONNX Optimizer targets for other cmake libraries to use.

+include(CMakeFindDependencyMacro)
+find_dependency(onnx CONFIG)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also needs find_dependency(protobuf CONFIG), and probably others. It's technically benign here because onnx itself drags in protobuf.

Copy link
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like everything here but everything I don't like was already here, so I think we should take this update. @JavierMatosD are there any remaining over-your-dead-body issues?

@BillyONeal
Copy link
Member

Ah, I see above he just wanted a merge, so I'm going to merge. Thanks @MonicaLiu0311 !

@BillyONeal BillyONeal merged commit 88a0bf8 into microsoft:master Oct 18, 2024
16 checks passed
@MonicaLiu0311 MonicaLiu0311 deleted the Dev/Monica/update_onnx branch October 18, 2024 06:33
@ilya-lavrenov
Copy link
Contributor

Could you please also add ONNX 1.17.0 ?
https://github.com/onnx/onnx/releases/tag/v1.17.0

@MonicaLiu0311
Copy link
Contributor Author

Could you please also add ONNX 1.17.0 ? https://github.com/onnx/onnx/releases/tag/v1.17.0

Fixing by #42942.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support category:port-update The issue is with a library, which is requesting update new revision info:internal This PR or Issue was filed by the vcpkg team. info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[onnx] Missing ONNX 1.16 package in vcpkg
6 participants