-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
multiple-outputs.sh: Install static libraries into $static->$dev->$out
#229758
base: staging
Are you sure you want to change the base?
Conversation
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/cuda-team-roadmap-and-call-for-sponsors/29495/1 |
Hi @Luabee -- the CUDA maintainer team sees this as a very useful feature for automatically splitting out static libraries from CUDA redistributable. A number of the redistributables we use include static and dynamic libraries and approach a gigabyte in size. Being able to split out static copies of the library would allow us to shave hundreds of megabytes! What are your thoughts on the status of this PR? Do you see additional places for testing or improvement? I'd love to help if I can! |
At this point all the functional changes are in place. I'm just blocked on a confusing build error in an instance of gcc which I'm not familiar with.
|
I believe this is a highly desirable change. I have some nix-built container images that require JAX, TensorFlow and Torch all in one image. The increased size from the cuda libraries doesn't just add to the image size, but in my case more painfully to the single-threaded compression time for the images/layers. This PR would not only reduce the size of these kinds of images by several gigabytes, but also cut down on compression time. One small issue I could imagine popping up after this is that some compilers require certain static archives in their default configuration to "run". So we might end up with some cuda/sycl/hip/c++ compiler packages no longer working out of the box. Fixing such issues (if they even occur at all) seems rather simple though since in those rare cases the relevant archives can just be added back to the package explicitly. |
PSA: I won't be able to work on this at least through the rest of the year, so someone else would need to take it up if they want it merged |
Description of changes
During
preFixup
, static libraries (lib/*.a
) are now installed to the$static
output if it exists, or the$dev
output if that exists, or just to$out
as usual.This will make it easier to prevent static libs making it into system closures.
Related issues:
#164141
#224533
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/
)