-
-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
python310Packages.jax: 0.3.6 -> 0.3.16 #183051
Conversation
7819edd
to
7474a35
Compare
07ec157
to
7b4dce1
Compare
Status update: I'm stuck trying to get this to build on x86_64 darwin, getting errors like the following:
I'm less familiar with darwin, but it seems like this might be an issue with nixpkgs using an unsupported darwin SDK version for x86_64. Since v0.3.14, jax has bumped For now I'm going to mark this broken on darwin since I haven't been able to figure out a workaround. |
65472a1
to
1da50b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this together @mcwitt! Overall this looks thorough and most of the changes make sense to me. Just a few questions here and there...
] ++ lib.optionals (!stdenv.isDarwin) [ | ||
nsync | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was under the impression that the Darwin build was being disabled until we get the macOS 10.14 SDKs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This came from syncing with the tensorflow derivation (here:
nixpkgs/pkgs/development/python-modules/tensorflow/default.nix
Lines 232 to 234 in 3524da2
] ++ lib.optionals (!stdenv.isDarwin) [ | |
nsync | |
]; |
My thought was to leave the darwin-specific workarounds in place (even though the build is disabled for now) in case switching to the newer SDK fixes the remaining issues. I'm not really sure of the recommended practice in this situation, though -- happy to remove the gating if that seems preferable (and I guess we may end up doing it anyway if the SDK upgrade also fixes the
nsync
build on darwin).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, yeah now that we will have darwin builds working soon (shout out to @uri-canva!), we can figure how to make this work after all
@@ -197,7 +203,9 @@ let | |||
"typing_extensions_archive" | |||
"wrapt" | |||
"zlib" | |||
]; | |||
] ++ lib.optionals (!stdenv.isDarwin) [ | |||
"nsync" # fails to build on darwin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that the package fails to build on darwin entirely, or that it fails to build without this particular line of code? Or does it mean that the vendored version of nsync fails to build?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it means that nsync in nixpkgs is not supported on darwin (darwin is not listed in platforms:
nixpkgs/pkgs/development/libraries/nsync/default.nix
Lines 25 to 27 in 603db2c
# On macOS we get an error for some reason: | |
# > mkdir: cannot create directory 'build': File exists | |
platforms = lib.platforms.linux; |
(This was taken from the tensorflow derivation.)
The darwin build might be ok after #184395, since that updates the package to use SDK 11.0, which is available in nixpkgs, it's just not the default one. |
d9dbfae
to
605d135
Compare
I skimmed over the breakages. Many seem to be caused by the following:
The others seem to be broken by unrelated issues (mostly incompatible |
python310Packages.jaxlib: 0.3.0 -> 0.3.15
10e6ce1
to
6bff360
Compare
Unfortunately rebasing with #184395 merged hasn't magically fixed the darwin build.
|
I have not seen the |
It shows as successful 9 hours ago: https://hydra.nixos.org/eval/1777705?filter=jaxlib&compare=1777668&full= |
Oh I see, it's probably some new transitive dependency from the version upgrade. |
Seems to be a known issue with bazel: |
The workarounds might be a bit hard for us though, not sure how well gcc works on darwin, but we can try. |
Thanks for digging into these failures @mcwitt!
Just to confirm: @mcwitt are you building on x86_64-darwin? |
@samuela yes, the |
It appears that |
Is there any hope trying to fix or patch the x86_64-darwin bug ourselves? It appears to be a quite hairy issue in bazel IIUC... Perhaps we should also raise it with the JAX folks? |
@samuela I'd be happy to handle upgrading chex and jmp after this is merged (already have the updates building in local branches so it shouldn't be too much work 🤞 ) |
@mcwitt @uri-canva How do ya'll feel about merging this as is, despite the fact that it breaks the x86_64-darwin build? On the one hand I hate to break the build... OTOH a) this breakage isn't our fault, b) I don't want PRs to get stuck forever. wdyt? |
Yeah I think it's ok, I only just fixed the darwin build, and I'm not sure how long it was broken before that, so I don't think there would be anyone depending on it. |
Let's mark it as broken and add a comment with all the context / links to the issues for future reference. That way when someone looks at it in the future they won't have to start figuring it out from scratch. |
Yeah, I def don't want you to think that the x86_64-darwin work was for nothing @uri-canva! We should def commit to getting darwin support back up and running as soon as upstream progress on this issue allows. |
so we can merge this now or not? |
I think we can! |
Description of changes
Upgrades
jax
to 0.3.16 andjaxlib
to 0.3.15.Still a draft because this depends on #183052.Note: This marks the darwin build as broken becausejax>=0.3.14
setsmacos_minimum_os=10.14
, but as far as I can tell 10.12 is the latest supported for x86_64 in nixpkgs (relevant issue: #101229).Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes