!eWOErHSaiddIbsUNsJ:nixos.org

NixOS CUDA

288 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
31 Oct 2024
@frederiksemmel:matrix.orgFrederik Semmel joined the room.15:16:14
@frederiksemmel:matrix.orgFrederik Semmel
In reply to @connorbaker:matrix.org
Absolute biggest pain in my ass right now is packaging onnxruntime (https://github.com/ConnorBaker/cuda-packages/blob/main/cudaPackages-common/onnxruntime/package.nix).
For the ONNX and TensorRT ecosystem, I’m doing a cursed build where the CMake and Python builds are interlaced.
Turns out doing a straight CMake build gives different results compared to doing a Python build. Go figure, the multi-thousand line Python scripts invoked by setup.py change how stuff is configured.

Hi connor (he/him) (UTC-7) , first off, the Nix CUDA team is doing awesome work! I have spent the last week reading everything cuda related in nixpkgs and watching NixCon talks :) I am also trying to run onnxruntime with the tensorrt backend on a jetson device with NixOS. Really looking forward to how you might solve the puzzle there. I am new to Nix, therefore I hoped it would be simpler for me to patch the onnxruntime-gpu binaries provided by jetson zoo. My approach is:

  • use poetry2nix to pull the specific wheel and run patchelf
  • use an poetry2nix overlay to add the cuda packages from jetpack-nixos to the buildInputs of onnxruntime-gpu

Is this doable like this, do you recommend this? I find it amazing that torch from nixpkgs just works thanks to cuda_compat. Can the cuda_compat trick work here too? Thanks a lot for your time!

15:44:26
@didiercrunch:matrix.orgdidiercrunch joined the room.15:57:40
@connorbaker:matrix.orgconnor (burnt/out) (UTC-8) I have no idea if it’ll work, but please do try and let me know! I’m not familiar with the Jetson zoo, or how the binary wheels are packaged.
It sounds reasonable — the wheel should have libraries built to target Jetson devices which link against CUDA libraries, and using autoPatchelfHook and including CUDA libraries in buildInputs should patch the libraries so they resolve to the ones provided by Nixpkgs…
I don’t fully understand what cuda_compat does, but my understanding is that it serves as a shim between newer CUDA libraries and an older CUDA driver on the Jetson?
At any rate, try it out and let me know!
16:16:51
@frederiksemmel:matrix.orgFrederik SemmelOk awesome, thanks for the quick reply! At least there is not something completely wrong with the approach. I will let you know if I can make it work 👌 Did anyone else get onnxruntime working with the tensorrt execution provider on a jetson?16:24:25
@connorbaker:matrix.orgconnor (burnt/out) (UTC-8)I can’t remember if I managed to get it building on Jetson, I got distracted and started doing work on the nix interpreter16:26:15
@connorbaker:matrix.orgconnor (burnt/out) (UTC-8)Also, which Jetson generation are you using? Please let it be at least Xavier :(16:27:48
@frederiksemmel:matrix.orgFrederik Semmel Its the Orin NX luckily :) I am free to choose a different platform, I am still evaluating what is best for our AI on the edge usecase. From what you say it seems like its not going to be impossible, so I will work my way through it. I hope I can find a a good solution, if I do I will try to contribute it to nixpkgs or jetpack-nixos 16:31:01
@search-sense:matrix.orgsearch-senseI am sorry ``nix run github:SomeoneSerge/pkgs#pkgsCuda.some-pkgs-py.stable-diffusion-webui``` doesn't work anymore 17:06:45
@search-sense:matrix.orgsearch-sense * I am sorry nix run github:SomeoneSerge/pkgs#pkgsCuda.some-pkgs-py.stable-diffusion-webui doesn't work anymore 17:07:06
@ss:someonex.netSomeoneSerge (back on matrix)
In reply to @search-sense:matrix.org
I am sorry nix run github:SomeoneSerge/pkgs#pkgsCuda.some-pkgs-py.stable-diffusion-webui doesn't work anymore
Yeah didn't keep track of it, must've broke with a nixpkgs bump
17:13:06
@search-sense:matrix.orgsearch-senseI unfourtanetly lost the working commit for this repo17:25:04
@connorbaker:matrix.orgconnor (burnt/out) (UTC-8)
In reply to @ss:someonex.net
Hey wanna publish a review on exposing extendMkDerivationArgs?
Was this in reference to an existing PR or something new?
I apologize, I've been really scattered the last two weeks :l
17:57:28
@ss:someonex.netSomeoneSerge (back on matrix)
In reply to @connorbaker:matrix.org
Was this in reference to an existing PR or something new?
I apologize, I've been really scattered the last two weeks :l
https://github.com/NixOS/nixpkgs/pull/350350
19:38:48
@ss:someonex.netSomeoneSerge (back on matrix)Huh, seems like there was a simultaneous chagne19:39:37
@ss:someonex.netSomeoneSerge (back on matrix) * Huh, seems like there was a simultaneous change19:39:39
@glepage:matrix.orgGaétan Lepage If you happen to just wake of from 6 months spent in coma, don't worry, the triton repo still hasn't got any more tags. 22:44:38
@glepage:matrix.orgGaétan Lepageclipboard.png
Download clipboard.png
22:44:41
@glepage:matrix.orgGaétan Lepage7 months22:45:05
@glepage:matrix.orgGaétan Lepage* 7 months*22:45:07
@glepage:matrix.orgGaétan Lepage * If you happen to just wake of from 6 months spent in coma, don't worry, the triton repo still hasn't got any new tag. 22:45:22
1 Nov 2024
@ss:someonex.netSomeoneSerge (back on matrix)I don't think anything short of a github action publishing automatic tags in release branches is going to work with this organization:)07:40:32
@ss:someonex.netSomeoneSerge (back on matrix)That might not either but stands a chance (they merged stuff before)07:40:56
@gdesforges:matrix.orgGuillaume Desforges changed their profile picture.21:19:14
2 Nov 2024
@sielicki:matrix.orgsielickiI do not really follow the conversation on https://github.com/NixOS/nixpkgs/pull/34370623:22:57
@sielicki:matrix.orgsielicki I don't think it actually matters in this case but just want to call it out if it ever comes up again in the context of nixpkgs: to support the cuda stubs (where you can successfully link a binary against the cuda driver api with the cuda toolkit alone, despite that it doesn't include the full UMD blob), on normal distributions nvidia creates an /usr/local/cuda/lib64/stubs/libcuda.so files, which claim a SONAME with .1, but where the file on disk doesn't actually have that. That means the dynamic loader will never accidentally confuse the stub with the real library. 23:23:59
@ss:someonex.netSomeoneSerge (back on matrix)Huh23:25:10
@sielicki:matrix.orgsielickibut now, for some of the libraries that got relinked here, I think now there's two files that have the same name, and im not sure what the dynamic loader does23:25:29
@sielicki:matrix.orgsielicki * but now, for some of the libraries that got relinked here, I think now there's two files that have the same name, and im not sure what the dynamic loader does edit: maybe not under nixos but potentially for people doing nix on ubuntu or whatever23:25:52
@sielicki:matrix.orgsielickihere let me find you a link, one sec23:26:10

Show newer messages


Back to Room ListRoom Version: 9