!eWOErHSaiddIbsUNsJ:nixos.org

NixOS CUDA

284 Members
CUDA packages maintenance and support in nixpkgs | https://github.com/orgs/NixOS/projects/27/ | https://nixos.org/manual/nixpkgs/unstable/#cuda57 Servers

Load older messages


SenderMessageTime
15 Dec 2025
@apyh:matrix.orgapyherr.. but it uses dlopen, right?21:17:13
@sporeray:matrix.orgRobbie BuxtonSure but then it’ll know where it is no?21:17:32
@apyh:matrix.orgapyhmy understanding is that bare soname dlopen doesn't care about that21:18:01
@apyh:matrix.orgapyhlike we'd have to patch the *python* binary21:18:13
@apyh:matrix.orgapyh(very possible. I'm completely wrong here though, this is all new to me)21:18:23
@sporeray:matrix.orgRobbie Buxton A bare no name dlopen will check the runpaths for where it’s being called form 21:18:26
@apyh:matrix.orgapyhright, but that's the top level executable, python, not the libraries in the chain, no?21:18:58
@sporeray:matrix.orgRobbie Buxton Nah each library checks its own runpath 21:19:15
@sporeray:matrix.orgRobbie Buxton As it goes down the call chain 21:19:21
@apyh:matrix.orgapyhI thought this was true with DT_NEEDED but not with dlopen..21:20:05
@sporeray:matrix.orgRobbie Buxton I’m pretty sure this is how it works based on my experience but I could be wrong. 21:21:01
@apyh:matrix.orgapyhno very possible you're right lol - ok so id patchelf, what, cudnn?21:21:22
@sporeray:matrix.orgRobbie Buxton I defer to smarter people @[Gaétan Lepage] @[connor (burnt/out) (UTC-8)] @[SomeoneSerge (back on matrix)] 21:21:41
@sporeray:matrix.orgRobbie Buxton Basically if you readelf -d on the cudnn.so you should be able to see what it says it needs 21:22:17
@sporeray:matrix.orgRobbie Buxton And if you run patchelf —print-rpaths it’ll show you what it has in the runpaths 21:23:27
@sporeray:matrix.orgRobbie Buxton I’m fairly confident this is in fact runpaths and not rpaths but I might be mistaken 21:23:47
@sporeray:matrix.orgRobbie Buxton If you are able to add libnvrtc.so to that list and add it as a build input nix should atomically add it to the runpath for you 21:25:02
@sporeray:matrix.orgRobbie Buxton There may be a nicer way of doing this these days I’m not sure 21:25:14
@sporeray:matrix.orgRobbie Buxton I think there is patchelfFlagsArray and appendRunpaths you can use 21:26:27
@arilotter:matrix.orgAri Lotter40m to build torch with cuda, not bad. 22:06:33
@arilotter:matrix.orgAri Lotter

huh. well, i thought

 (self: super: {
        cudaPackages = super.cudaPackages // {
          cudnn = super.cudaPackages.cudnn.overrideAttrs (old: {
            postFixup = (old.postFixup or "") + ''
              for so in $out/lib/libcudnn*.so; do
                echo "patching rpath of $so to include nvrtc"
                patchelf --set-rpath ${super.lib.getLib super.cudaPackages.cuda_nvrtc}/lib:$out/lib $so
              done
            '';
          });
        };
      })
``` might work, but doesn't seem to have
22:09:01
@arilotter:matrix.orgAri Lotter *

huh. well, i thought

 (self: super: {
        cudaPackages = super.cudaPackages // {
          cudnn = super.cudaPackages.cudnn.overrideAttrs (old: {
            postFixup = (old.postFixup or "") + ''
              for so in $out/lib/libcudnn*.so; do
                echo "patching rpath of $so to include nvrtc"
                patchelf --set-rpath ${super.lib.getLib super.cudaPackages.cuda_nvrtc}/lib:$out/lib $so
              done
            '';
          });
        };
      })
``` might work, but doesn't seem to have
22:09:09
@arilotter:matrix.orgAri Lotter *

huh. well, i thought

 (self: super: {
        cudaPackages = super.cudaPackages // {
          cudnn = super.cudaPackages.cudnn.overrideAttrs (old: {
            postFixup = (old.postFixup or "") + ''
              for so in $out/lib/libcudnn*.so; do
                echo "patching rpath of $so to include nvrtc"
                patchelf --set-rpath ${super.lib.getLib super.cudaPackages.cuda_nvrtc}/lib:$out/lib $so
              done
            '';
          });
        };
      })

might work, but doesn't seem to have

22:09:16
@arilotter:matrix.orgAri Lottertryin this22:10:57
@sporeray:matrix.orgRobbie Buxton
In reply to @arilotter:matrix.org
40m to build torch with cuda, not bad.
The dream
22:13:45
@sporeray:matrix.orgRobbie Buxton* The dream 🥲22:13:54
@arilotter:matrix.orgAri Lotterlmk if you ever need something built lol i have some juicy machines thru work22:15:36
@pdealbera:matrix.orgpdealberaOk, following on this. It's weird that I've still cannot reach the server at all. I even try to connect from mobile data in a phone just to discard a problem in my home network or network config in my PC but it's not reachable at all. For reference I'm from Argentina.22:34:43
16 Dec 2025
@arilotter:matrix.orgAri Lotterholy shit it worked 😭i don't believe it00:39:07
@sporeray:matrix.orgRobbie BuxtonYooooooooo00:39:29

Show newer messages


Back to Room ListRoom Version: 9