Skip to content

Conversation

@prusnak
Copy link
Member

@prusnak prusnak commented Apr 13, 2025

This PR combines fixes of these 3 upstream issues:

All 3 are related to segfault (internal compiler error) caused by the force_subreg function and are fixed by using the new force_lowpart_subreg function

Hopefully all 3 fixes will become part of the 14.3.0 release but until then we should patch them locally since the ICE can be triggered by compiling torch 2.6.0 on aarch64 and thus this blocks torch update in #377785.

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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

@github-actions github-actions bot added 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. labels Apr 13, 2025
@prusnak
Copy link
Member Author

prusnak commented Apr 14, 2025

I rebuilt #377785 on top of this branch and confirmed the GCC 14 patch fixed the torch 2.6.0 build issue on aarch64.

@prusnak
Copy link
Member Author

prusnak commented Apr 15, 2025

what do you think? @trofi @emilazy @vcunat

@prusnak prusnak requested a review from emilazy April 15, 2025 12:17
@GaetanLepage
Copy link
Contributor

NB: This is blocking the pytorch update.

@emilazy
Copy link
Member

emilazy commented Apr 15, 2025

Perhaps we should bump the snapshot again, if these fixes are already upstream?

@prusnak
Copy link
Member Author

prusnak commented Apr 15, 2025

Perhaps we should bump the snapshot again, if these fixes are already upstream?

They are upstream, but only in trunk (gcc 15) - they have not been backported to gcc 14 branch yet as can be seen in the upstream bugzilla.

@vcunat
Copy link
Member

vcunat commented Apr 15, 2025

I don't object. I just don't have capacity to verify that backporting this makes sense (probably it's OK).

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label Apr 15, 2025
@flokli
Copy link
Member

flokli commented Apr 16, 2025

Successfully built this on aarch64, and considering it's in gcc trunk like this and fixes aarch64 builds, I think it's fine to land this 👍

@flokli flokli merged commit 9a3a1a2 into NixOS:staging Apr 16, 2025
43 of 44 checks passed
@prusnak prusnak deleted the gcc-aarch64-fix-ice branch April 16, 2025 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants