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

libtorch-bin: 2.0.0 -> 2.2.2 #302427

Closed
wants to merge 1 commit into from

Conversation

pinpox
Copy link
Member

@pinpox pinpox commented Apr 7, 2024

Description of changes

Also fixed the prefetch script, the url seems to have slightly changed Fixes #299311

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.05 Release Notes (or backporting 23.05 and 23.11 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.

@msanft
Copy link
Contributor

msanft commented Apr 7, 2024

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

1 package failed to build:
  • ocamlPackages.torch
3 packages built:
  • in-formant
  • libtorch-bin
  • libtorch-bin.dev

@pinpox
Copy link
Member Author

pinpox commented Apr 8, 2024


1 package failed to build:

* ocamlPackages.torch

Hm, not sure wahat to do about the ocaml package. @bcdarwin could you take a look?

Copy link
Member

@junjihashimoto junjihashimoto left a comment

Choose a reason for hiding this comment

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

@pinpox Thank you for updating it.
Could you change cu118 to cu121? Because pytorch's default(pip) is cu121.

@pinpox
Copy link
Member Author

pinpox commented Apr 8, 2024

Could you change cu118 to cu121? Because pytorch's default(pip) is cu121.

done.

@ofborg ofborg bot requested a review from junjihashimoto April 8, 2024 15:57
@bcdarwin
Copy link
Member

bcdarwin commented Apr 8, 2024

1 package failed to build:

* ocamlPackages.torch

Hm, not sure wahat to do about the ocaml package. @bcdarwin could you take a look?

Ocaml-torch hasn't been updated in a year or so, so not surprising it would eventually break. Happy for you to mark broken for now.

@npatsakula
Copy link
Contributor

npatsakula commented Apr 8, 2024

Hello @pinpox!

I've tested new version with hash from this PR on x86_64 (linux + CPU), so maybe we can mark checkbox as completed:
#302184

Also I need to mention that 2.2.2 has support of aarch64 Darwin and it would be great to add that to this PR.

@junjihashimoto, it seems that I need to close my PR as a duplicate.

@junjihashimoto
Copy link
Member

@npatsakula
Thank you for pointing it out.
It is preferable that the new version also uses cu121 not cu118.

@pinpox
Copy link
Member Author

pinpox commented Apr 10, 2024

aarch64 added (thanks @npatsakula !). Let me know if something else is missing.

Copy link
Member

@junjihashimoto junjihashimoto left a comment

Choose a reason for hiding this comment

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

LGTM!

@msanft
Copy link
Contributor

msanft commented Apr 12, 2024

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

3 packages built:
  • in-formant
  • libtorch-bin
  • libtorch-bin.dev

@pbsds
Copy link
Contributor

pbsds commented Apr 16, 2024

Please squash the commits, and could you look into the aarch64-darwin issue?

@pinpox
Copy link
Member Author

pinpox commented Apr 19, 2024

Please squash the commits, and could you look into the aarch64-darwin issue?

fixed and squashed

@ofborg ofborg bot requested a review from junjihashimoto April 19, 2024 09:41
Copy link
Member

@junjihashimoto junjihashimoto left a comment

Choose a reason for hiding this comment

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

Thx!

@pbsds
Copy link
Contributor

pbsds commented Apr 21, 2024

aarch64-darwin is still failing, did you forget to push the change?

@npatsakula
Copy link
Contributor

aarch64-darwin is still failing, did you forget to push the change?

Hello @pbsds! My bad, looks like I need your help:

  1. I don't understand this error message and I am unable to associate it to particular package test.
  2. I can't reproduce this test on my aarch64-darwin machine, It compiles without errors (I'm using this package from flake).

@pbsds
Copy link
Contributor

pbsds commented Apr 21, 2024

I'm not familiar with nor have access to darwin, but as I understand the darwin build sandbox is lacking. Perhaps it passes on your machine since the dyld check is able to match with a dylib on your system that the ofborg builders don't have installed?

Comparing the fixupPhase output in the full logs: https://logs.ofborg.org/?attempt_id=e65c3bce-5f6e-450f-9be7-f390bfbb6790&key=nixos%2Fnixpkgs.302427

x86_64-darwin:

/nix/store/h7rmvcdf3vlizf0nzjadxy18vh60ngin-libtorch-2.2.2/lib/libtorch_python.dylib: fixing dylib
/nix/store/h7rmvcdf3vlizf0nzjadxy18vh60ngin-libtorch-2.2.2/lib/libbackend_with_compiler.dylib: fixing dylib
/nix/store/h7rmvcdf3vlizf0nzjadxy18vh60ngin-libtorch-2.2.2/lib/libtorch.dylib: fixing dylib
/nix/store/h7rmvcdf3vlizf0nzjadxy18vh60ngin-libtorch-2.2.2/lib/libtorch_global_deps.dylib: fixing dylib
/nix/store/h7rmvcdf3vlizf0nzjadxy18vh60ngin-libtorch-2.2.2/lib/libiomp5.dylib: fixing dylib
/nix/store/h7rmvcdf3vlizf0nzjadxy18vh60ngin-libtorch-2.2.2/lib/libtorch_cpu.dylib: fixing dylib
/nix/store/h7rmvcdf3vlizf0nzjadxy18vh60ngin-libtorch-2.2.2/lib/libjitbackend_test.dylib: fixing dylib
/nix/store/h7rmvcdf3vlizf0nzjadxy18vh60ngin-libtorch-2.2.2/lib/libc10.dylib: fixing dylib
/nix/store/h7rmvcdf3vlizf0nzjadxy18vh60ngin-libtorch-2.2.2/lib/libtorchbind_test.dylib: fixing dylib
/nix/store/h7rmvcdf3vlizf0nzjadxy18vh60ngin-libtorch-2.2.2/lib/libshm.dylib: fixing dylib

aarch64-darwin:

/nix/store/2cfbhxddvg39fc6ldqk0kk7qs7vgrigz-libtorch-2.2.2/lib/libtorch_python.dylib: fixing dylib
/nix/store/2cfbhxddvg39fc6ldqk0kk7qs7vgrigz-libtorch-2.2.2/lib/libtorch.dylib: fixing dylib
/nix/store/2cfbhxddvg39fc6ldqk0kk7qs7vgrigz-libtorch-2.2.2/lib/libtorch_global_deps.dylib: fixing dylib
/nix/store/2cfbhxddvg39fc6ldqk0kk7qs7vgrigz-libtorch-2.2.2/lib/libtorch_cpu.dylib: fixing dylib
/nix/store/2cfbhxddvg39fc6ldqk0kk7qs7vgrigz-libtorch-2.2.2/lib/libc10.dylib: fixing dylib
/nix/store/2cfbhxddvg39fc6ldqk0kk7qs7vgrigz-libtorch-2.2.2/lib/libshm.dylib: fixing dylib

Some seem to be missing

@junjihashimoto
Copy link
Member

libcxx-for-libtorch = if stdenv.hostPlatform.system == "x86_64-darwin" then libcxx else stdenv.cc.cc.lib;

Could you update the code to use stdenv.isDarwin?

Copy link
Member

@junjihashimoto junjihashimoto left a comment

Choose a reason for hiding this comment

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

Thx!

@pbsds
Copy link
Contributor

pbsds commented Apr 25, 2024

builder failure... I'd love to verify the darwin fix

@ofborg build libtorch-bin

@junjihashimoto
Copy link
Member

@pinpox @pbsds

Probably platforms should be updated like this PR.

    platforms = with platforms; [
      "aarch64-darwin"
      "x86_64-darwin" "x86_64-linux"
    ];

https://github.com/pinpox/nixpkgs/pull/2/files#diff-3a9f32ef2e590562647c6c78cd8af994c4ef85795f4ef1744e5d43069bdc3155R102-R105

@Aleksanaa
Copy link
Member

Yes, keep in mind Unix is not Linux + Darwin and all is not x86_64 + aarch64

@pbsds
Copy link
Contributor

pbsds commented Apr 27, 2024

It worked before the push, and now it failed again.
The failure seems to be a lack of libomp.dylib, which i assume is builder dependent.
Pytorch darwin assumes libomp (pytorch/pytorch#20030) which should be provided by llvmPackages.openmp. If the binaries are patched with this we should get a more hermetic runtime closure

@npatsakula npatsakula mentioned this pull request May 1, 2024
13 tasks
@wegank
Copy link
Member

wegank commented May 4, 2024

Superseded by #308328.

@wegank wegank closed this May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update request: libtorch-bin 2.0.0 → 2.2.1
9 participants