Skip to content

python3Packages.torch: explicitly include libopenmp on Darwin x86_64#430808

Merged
NickCao merged 1 commit intoNixOS:masterfrom
sarahec:pytorch-cxxdev-fix
Aug 4, 2025
Merged

python3Packages.torch: explicitly include libopenmp on Darwin x86_64#430808
NickCao merged 1 commit intoNixOS:masterfrom
sarahec:pytorch-cxxdev-fix

Conversation

@sarahec
Copy link
Contributor

@sarahec sarahec commented Aug 4, 2025

PR #424873 fixed multiple builds hanging by disabling a "duplicate"* copy of the OpenMP dylib on Darwin. While this fixed, aarch64, this broke compilation on x86_64 (see #430472).

This PR omits the "duplicate" copy only on aarch64 and restores it on x86_64.

* "Duplicate": two copies of the dylib visible while running. Normally this is a non-issue on Darwin, but FAISS crashes on ARM with multiple copies of openMP visible. (See pytorch/pytorch#149201 (comment))

Fixes #430472

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Aug 4, 2025
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 6.topic: python Python is a high-level, general-purpose programming language. labels Aug 4, 2025
@sarahec
Copy link
Contributor Author

sarahec commented Aug 4, 2025

nixpkgs-review result

aarch64-Darwin

Generated using nixpkgs-review.

Command: nixpkgs-review pr 430808
Commit: c387b7908bd35d57b3e1df6e587dd4dd547c88bd

@sarahec
Copy link
Contributor Author

sarahec commented Aug 4, 2025

nixpkgs-review result

x86_64-Darwin

Generated using nixpkgs-review.

Command: nixpkgs-review pr 430808

@sarahec
Copy link
Contributor Author

sarahec commented Aug 4, 2025

Normally an empty nixpkgs-review would worry me, but I confirmed building on both aarch64 and x86-64. This PR maintains the status quo for aarch64 builds and uses the non-broken x86_64 builds from the prior PR. So I guess it makes sense.

@sarahec sarahec requested a review from Aleksanaa August 4, 2025 15:14
Copy link
Contributor

@GaetanLepage GaetanLepage left a comment

Choose a reason for hiding this comment

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

Thanks!

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Aug 4, 2025
@GaetanLepage GaetanLepage requested a review from NickCao August 4, 2025 20:50
@NickCao NickCao merged commit a4a86ff into NixOS:master Aug 4, 2025
32 of 34 checks passed
@sarahec sarahec deleted the pytorch-cxxdev-fix branch August 5, 2025 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: darwin Running or building packages on Darwin 6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build failure: python3Packages.torch on x86_64-darwin

3 participants