Skip to content

onnxruntime: 1.16.3 -> 1.18.0#319137

Closed
jkachmar wants to merge 1 commit intoNixOS:masterfrom
jkachmar:onnxruntime-1_18_0
Closed

onnxruntime: 1.16.3 -> 1.18.0#319137
jkachmar wants to merge 1 commit intoNixOS:masterfrom
jkachmar:onnxruntime-1_18_0

Conversation

@jkachmar
Copy link
Copy Markdown
Contributor

Description of changes

version bump; release notes for versions between 1.16.3 & 1.18.0:

i haven't tested any of the CUDA stuff.

maintainers: @puffnfresh @ck3d @cbourjau

possibly interested parties from #309015: @wexder @madsmtm

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i'm surprised flatbuffers works given that it should be a clear version mismatch

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Well, see #330416

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

need to support #include <locale> in onnxruntime/core/providers/cpu/text/string_normalizer.cc (& probably elsewhere).

without this a bunch of ContribOpTests fail (StringNormalizer* & WordConvEmbedding*)

Comment on lines 65 to 82
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

probably cleaner to factor out pytorch_cpuinfo rev & share that between the source & the clog version string.

also even though pytorch_clog doesn't seem to use gbenchmark it'll fail without -DUSE_SYSTEM_GOOGLEBENCHMARK=ON so we have to leave it there

Comment on lines 185 to 199
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i feel like flatbuffers should fail given issues like microsoft/onnxruntime#14981; maybe the local build i tested out was flawed and it's actually not gonna work in CI

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i think this patch might be unnecessary, given the comment in onnxruntime/default.nix on the line where this patch is included

@jkachmar jkachmar force-pushed the onnxruntime-1_18_0 branch from d512061 to 2423bcd Compare June 11, 2024 21:29
Comment on lines 82 to 90
onnx = fetchFromGitHub {
owner = "onnx";
repo = "onnx";
rev = "refs/tags/v1.14.1";
hash = "sha256-ZVSdk6LeAiZpQrrzLxphMbc1b3rNUMpcxcXPP8s/5tE=";
rev = "refs/tags/v1.16.1";
hash = "sha256-I1wwfn91hdH3jORIKny0Xc73qW2P04MjkVCgcaNnQUE=";
};
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

why are we vendoring onnx? it looks like there's an open MR to bump to 1.16 which would be compatible here #299313

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@acairncross, since you're listed as the onnx maintainer

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

IIRC, onnxruntime is loosely correlated to onnx (the python package) so the don't have to be in lockstep. Although, I would probably prefer that we try to move to a world where we don't vendor a local copy.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

so i can open a PR updating onnx to 1.16.1 & then reference the source here; is there a preference for how to structure that?

i guess python3Packages is already an argument, so it could just be python3Packages.onnx_1_16.src & some comment or assertion indicating that we want compatibility checks in a similar fashion to how other packages with source dependencies like this are structured?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There's a tradeoff, as now if you bump onnx, you have to be concerned about onnxruntime. And it's a matter of if that should be the case.

@ofborg ofborg bot requested review from ck3d, jonringer and puffnfresh June 11, 2024 21:47
@ofborg ofborg bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Jun 11, 2024
Comment on lines 12 to 19
- FetchContent_Populate(eigen)
- set(eigen_INCLUDE_DIRS "${eigen_SOURCE_DIR}")
+ FetchContent_MakeAvailable(eigen)
+ add_library(eigen ALIAS Eigen3::Eigen)
+
+ # Onnxruntime doesn't always use `eigen` as a target in
+ # `target_link_libraries`, sometimes it just uses
+ # `target_include_directories`:
+ get_target_property(eigen_INCLUDE_DIRS Eigen3::Eigen INTERFACE_INCLUDE_DIRECTORIES)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I really need to upstream a -DPREFER_SYSTEM_LIBS type of switch..... tired of having to carry around patches which disable network behaviors.

Comment on lines 82 to 90
onnx = fetchFromGitHub {
owner = "onnx";
repo = "onnx";
rev = "refs/tags/v1.14.1";
hash = "sha256-ZVSdk6LeAiZpQrrzLxphMbc1b3rNUMpcxcXPP8s/5tE=";
rev = "refs/tags/v1.16.1";
hash = "sha256-I1wwfn91hdH3jORIKny0Xc73qW2P04MjkVCgcaNnQUE=";
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

IIRC, onnxruntime is loosely correlated to onnx (the python package) so the don't have to be in lockstep. Although, I would probably prefer that we try to move to a world where we don't vendor a local copy.

@jkachmar
Copy link
Copy Markdown
Contributor Author

okay looks like there are some failures with clog so i'm going to have to actually test this out more on nixpkgs-24.05:

make[2]: *** [CMakeFiles/clog-test.dir/build.make:76: CMakeFiles/clog-test.dir/test/clog.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:111: CMakeFiles/clog-test.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
error: builder for '/nix/store/2kh962g19v3yglcadnjy2i71yaabivzz-clog-3c8b153.drv' failed with exit code 2;
       last 10 log lines:
       > /nix/store/8l47dmnifglj4lrwxsjf08jf1qzmbh1m-gtest-1.14.0-dev/include/gtest/gtest.h: At global scope:
       > /nix/store/8l47dmnifglj4lrwxsjf08jf1qzmbh1m-gtest-1.14.0-dev/include/gtest/gtest.h:302:30: error: 'std::enable_if_t' has not been declared
       >   302 |   template <typename T, std::enable_if_t<std::is_convertible<T, int64_t>::value,
       >       |                              ^~~~~~~~~~~
       > /nix/store/8l47dmnifglj4lrwxsjf08jf1qzmbh1m-gtest-1.14.0-dev/include/gtest/gtest.h:302:41: error: expected '>' before '<' token
       >   302 |   template <typename T, std::enable_if_t<std::is_convertible<T, int64_t>::value,
       >       |                                         ^
       > make[2]: *** [CMakeFiles/clog-test.dir/build.make:76: CMakeFiles/clog-test.dir/test/clog.cc.o] Error 1
       > make[1]: *** [CMakeFiles/Makefile2:111: CMakeFiles/clog-test.dir/all] Error 2
       > make: *** [Makefile:146: all] Error 2
       For full logs, run 'nix log /nix/store/2kh962g19v3yglcadnjy2i71yaabivzz-clog-3c8b153.drv'.

@jonringer
Copy link
Copy Markdown
Contributor

maybe a CXX_STANDARD issue?

@jkachmar
Copy link
Copy Markdown
Contributor Author

ah yeah might be; clog tests set CXX 11. i disabled that & it looks like there's another error with this:

CMake Error: install(EXPORT "abslTargets" ...) includes target "test_allocator" which requires target "gmock" that is not in any export set.

...which i think is resolved by applying this patch from upstream which isn't in 1.18.0...?

i guess i didn't run into this at work b/c we're on older versions of gtest & abseil-cpp (from 23.11); rebuilding onnxruntime & i'll push changes if it passes i guess.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants