Skip to content

Comments

onnxruntime: 1.15.1 -> 1.16.3#258392

Merged
mweinelt merged 2 commits intoNixOS:masterfrom
cbourjau:update-onnxruntime
Feb 7, 2024
Merged

onnxruntime: 1.15.1 -> 1.16.3#258392
mweinelt merged 2 commits intoNixOS:masterfrom
cbourjau:update-onnxruntime

Conversation

@cbourjau
Copy link
Contributor

@cbourjau cbourjau commented Oct 1, 2023

Description of changes

Regular update to the latest version. Release notes: https://github.com/microsoft/onnxruntime/releases/tag/v1.16.3

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 23.11 Release Notes (or backporting 23.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.

@ofborg ofborg bot requested review from ck3d, jonringer and puffnfresh October 1, 2023 13:00
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 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 Oct 1, 2023
@cbourjau
Copy link
Contributor Author

cbourjau commented Oct 2, 2023

Running nixpkgs-review on x86_64-linux on this PR triggers the build error described here: #251132 (comment)

@autrimpo autrimpo mentioned this pull request Oct 12, 2023
12 tasks
@Zahrun
Copy link
Contributor

Zahrun commented Jan 13, 2024

ONNX Runtime v1.16.3 came out

@cbourjau cbourjau changed the title onnxruntime: 1.15.1 -> 1.16.0 onnxruntime: 1.15.1 -> 1.16.3 Jan 14, 2024
@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Jan 14, 2024
@github-actions github-actions bot removed the 6.topic: python Python is a high-level, general-purpose programming language. label Jan 14, 2024
@cbourjau
Copy link
Contributor Author

I updated this PR. The ONNX ecosystem on nixpkgs (or one may say in general) is in a bit of disarray. It seems unlikely to get everything to build with a single PR. I'd love some feedback on how to proceed!

@cbourjau cbourjau marked this pull request as ready for review January 15, 2024 00:43
@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Jan 15, 2024
@Zahrun
Copy link
Contributor

Zahrun commented Jan 17, 2024

Related #281011 (comment)

@Scrumplex
Copy link
Member

Result of nixpkgs-review pr 258392 run on x86_64-linux 1

4 packages marked as broken and skipped:
  • piper-train
  • piper-train.dist
  • python312Packages.onnxruntime
  • python312Packages.onnxruntime.dist
6 packages failed to build:
  • python311Packages.fastembed
  • python311Packages.fastembed.dist
  • python311Packages.mmcv
  • python311Packages.mmcv.dist
  • python311Packages.tf2onnx
  • python311Packages.tf2onnx.dist
24 packages built:
  • aitrack
  • deface
  • deface.dist
  • livecaptions
  • monado
  • obs-studio-plugins.obs-backgroundremoval
  • onnxruntime
  • onnxruntime.dev
  • onnxruntime.dist
  • opencomposite-helper
  • piper-phonemize
  • piper-tts
  • python311Packages.faster-whisper
  • python311Packages.faster-whisper.dist
  • python311Packages.insightface
  • python311Packages.insightface.dist
  • python311Packages.onnxruntime
  • python311Packages.onnxruntime.dist
  • python311Packages.piper-phonemize
  • python311Packages.piper-phonemize.dist
  • python312Packages.piper-phonemize
  • python312Packages.piper-phonemize.dist
  • whisper-ctranslate2
  • whisper-ctranslate2.dist

@Scrumplex
Copy link
Member

error: builder for '/nix/store/kzdxv2ns7qq1dsbr30wj4n9yq2j8j699-python3.11-fastembed-0.1.2.drv' failed with exit code 1;
       last 10 log lines:
       > * Getting build dependencies for wheel...
       > * Building wheel...
       > Successfully built fastembed-0.1.1-py3-none-any.whl
       > Finished creating a wheel...
       > Finished executing pypaBuildPhase
       > Running phase: pythonRuntimeDepsCheckHook
       > Executing pythonRuntimeDepsCheck
       > Checking runtime dependencies for fastembed-0.1.1-py3-none-any.whl
       >   - huggingface-hub not installed
       >   - onnx not installed
       For full logs, run 'nix log /nix/store/kzdxv2ns7qq1dsbr30wj4n9yq2j8j699-python3.11-fastembed-0.1.2.drv'.
error: builder for '/nix/store/dqpzmjmmd4pwd9d6kqwsjjxgylgsmwch-python3.11-tf2onnx-1.15.1.drv' failed with exit code 1;
       last 10 log lines:
       > Executing pythonRemoveTestsDir
       > Finished executing pythonRemoveTestsDir
       > Running phase: installCheckPhase
       > no Makefile or custom installCheckPhase, doing nothing
       > Running phase: pythonCatchConflictsPhase
       > Found duplicated packages in closure for dependency 'protobuf':
       >        protobuf 4.24.4 (/nix/store/gknbg49nip7j60a53ch5g1b0hbxvqrhi-python3.11-protobuf-4.24.4/lib/python3.11/site-packages/protobuf-4.24.4.dist-info)
       >        protobuf 4.21.12 (/nix/store/fpcpf3fs5dbn0g3inkm2gl1zxk13d123-python3.11-protobuf-4.21.12/lib/python3.11/site-packages/protobuf-4.21.12.dist-info)
       >
       > Package duplicates found in closure, see above. Usually this happens if two packages depend on different version of the same dependency.
       For full logs, run 'nix log /nix/store/dqpzmjmmd4pwd9d6kqwsjjxgylgsmwch-python3.11-tf2onnx-1.15.1.drv'.

These are all unrelated to this PR I'd say

@Scrumplex
Copy link
Member

I mentioned in the other PR before that I had test failures before. I wonder if updating googletest made them go away magically?

@cbourjau
Copy link
Contributor Author

The gtest update was not necessary. I removed that part. But it is good to know that it will also work with 1.14. Once the nixpkgs version is up-to-date (PR) we can use that instead.

@ofborg ofborg bot requested a review from FRidh January 21, 2024 01:30
@cbourjau
Copy link
Contributor Author

Result of nixpkgs-review pr 258392 run on aarch64-darwin 1

4 packages marked as broken and skipped:
  • python311Packages.tf2onnx
  • python311Packages.tf2onnx.dist
  • python312Packages.onnxruntime
  • python312Packages.onnxruntime.dist
4 packages failed to build:
  • python311Packages.fastembed
  • python311Packages.fastembed.dist
  • python311Packages.mmcv
  • python311Packages.mmcv.dist
15 packages built:
  • deface
  • deface.dist
  • onnxruntime
  • onnxruntime.dev
  • onnxruntime.dist
  • piper-phonemize
  • piper-tts
  • python311Packages.insightface
  • python311Packages.insightface.dist
  • python311Packages.onnxruntime
  • python311Packages.onnxruntime.dist
  • python311Packages.piper-phonemize
  • python311Packages.piper-phonemize.dist
  • python312Packages.piper-phonemize
  • python312Packages.piper-phonemize.dist

@Scrumplex
Copy link
Member

Result of nixpkgs-review pr 258392 run on x86_64-linux 1

4 packages marked as broken and skipped:
  • piper-train
  • piper-train.dist
  • python312Packages.onnxruntime
  • python312Packages.onnxruntime.dist
6 packages failed to build:
  • python311Packages.fastembed
  • python311Packages.fastembed.dist
  • python311Packages.mmcv
  • python311Packages.mmcv.dist
  • python311Packages.tf2onnx
  • python311Packages.tf2onnx.dist
24 packages built:
  • aitrack
  • deface
  • deface.dist
  • livecaptions
  • monado
  • obs-studio-plugins.obs-backgroundremoval
  • onnxruntime
  • onnxruntime.dev
  • onnxruntime.dist
  • opencomposite-helper
  • piper-phonemize
  • piper-tts
  • python311Packages.faster-whisper
  • python311Packages.faster-whisper.dist
  • python311Packages.insightface
  • python311Packages.insightface.dist
  • python311Packages.onnxruntime
  • python311Packages.onnxruntime.dist
  • python311Packages.piper-phonemize
  • python311Packages.piper-phonemize.dist
  • python312Packages.piper-phonemize
  • python312Packages.piper-phonemize.dist
  • whisper-ctranslate2
  • whisper-ctranslate2.dist

@pinpox
Copy link
Member

pinpox commented Jan 23, 2024

What needs to be done to get this fixed? onnxruntime build failiure is preventing my system from building, anything I can help with? In case we have to wait still, is it possible to override nixpkgs to fix it somehow?

@kevinmehall kevinmehall mentioned this pull request Feb 6, 2024
13 tasks
@cbourjau
Copy link
Contributor Author

cbourjau commented Feb 7, 2024

Please note that onnxruntime 1.17.0 has been released in the meantime. Some of the dependencies were (aggressively) updated and the build is yet again not trivial for a nix beginner like me. Unfortunately, I don't currently have the time to push this PR over the finish line.

@Atemu Atemu marked this pull request as draft February 7, 2024 12:20
@spikespaz
Copy link
Contributor

Can't this PR be finished, and we can just point a finger at Microsoft?

@mweinelt
Copy link
Member

mweinelt commented Feb 7, 2024

I looked into the open reviews and addressed most/all of them. I think we should get a working version in before thinking about 1.17.0.

@mweinelt mweinelt marked this pull request as ready for review February 7, 2024 16:35
@ofborg ofborg bot requested a review from jonringer February 7, 2024 16:51
@mweinelt
Copy link
Member

mweinelt commented Feb 7, 2024

I decided to just fetch the eigen version that they pinned, instead of relying on a patched version of our source. At some point someone should try and use as many system dependencies as possible.

Copy link
Contributor

@SomeoneSerge SomeoneSerge left a comment

Choose a reason for hiding this comment

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

I'm trying to build this with the FIND_PACKAGE_ARGS patch (and without patching eigen at all), so far at 94% without errors. Waiting

EDIT: Yup, it just works, no patching seems to be needed. Or are we expecting a runtime error?

Uhm, I don't know which ref should I push to to update the PR?

@mweinelt
Copy link
Member

mweinelt commented Feb 7, 2024

The pythonSupport flag is also broken, the build always enables python support unconditionally.

@mweinelt
Copy link
Member

mweinelt commented Feb 7, 2024

The branch is on ssh://[email protected]:cbourjau/nixpkgs.git.

Copy link
Contributor

@SomeoneSerge SomeoneSerge Feb 7, 2024

Choose a reason for hiding this comment

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

This could've been a smaller diff. The real change is that we add FIND_PACKAGE_ARGS everywhere, and later 1) alias eigen (abused by onnxruntime) to Eigen3::Eigen (declared by eigen), 2) set something_INCLUDE_DIRS (abused by onnxruntime) because apparently they don't even consistently use eigen as a target, 3) replace the low-level Populate (never to be used) with the higher-level MakeAvailable

The 2nd item could be done in a cleaner manner by querying stuff about the Eigen3::Eigen target but honestly not worth thinking over, because we should open an issue upstream

Copy link
Member

@mweinelt mweinelt Feb 7, 2024

Choose a reason for hiding this comment

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

I worry most about someone not familiar with CMake having to rebase those patches, given the precarious maintenance situation. 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

Minimized the patch and added comments to navigate updaters

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

@SomeoneSerge SomeoneSerge left a comment

Choose a reason for hiding this comment

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

No objections to merging from my side.
The FetchContent/git-submodules mess needs to be untangled at some point, but this PR was meant as an update

Copy link
Contributor

Choose a reason for hiding this comment

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

RE: darwin

It's just a timeout seems like:

error: building of '/nix/store/y3h8gjk3l1myg7fv5l27v3cz7j48v5yy-onnxruntime-1.16.3.drv!out' from .drv file timed out after 3600 seconds

@mweinelt mweinelt merged commit ee2312f into NixOS:master Feb 7, 2024
@cbourjau cbourjau deleted the update-onnxruntime branch February 8, 2024 01:25
@cbourjau
Copy link
Contributor Author

cbourjau commented Feb 8, 2024

Thank you all for pushing this forward! ❤️

EDIT: Yup, it just works, no patching seems to be needed. Or are we expecting a runtime error?

@SomeoneSerge I'm afraid the patch is needed for Darwin: https://hydra.nixos.org/build/248915128/nixlog/1

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I see. Thanks for spotting! We can apply it unconditionally now, in eigen's patches

@SomeoneSerge SomeoneSerge mentioned this pull request Feb 8, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 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. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

python311Packages.onnxruntime fails to build, x86_64 24.05