!eWOErHSaiddIbsUNsJ:nixos.org

NixOS CUDA

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

You have reached the beginning of time (for this room).


SenderMessageTime
6 Jul 2024
@ss:someonex.netSomeoneSerge (utc+3)
In reply to @hexa:lossy.network
https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/#nvcc-environment-variables
Yes, we use that in setupCudaHook
18:24:20
@ss:someonex.netSomeoneSerge (utc+3)In a limited way...18:24:31
@connorbaker:matrix.orgconnor (he/him) (UTC-7) Oh that reminds me: At least one Python package with CUDA support in Nixpkgs invokes NVCC from within Python scripts as part of its setup, and so our NVCC_PREPEND_FLAGS (or whatever the name is) in our setup hook is ignored
Don’t think that’s relevant but just something irritating I found some number of weeks ago (I believe I patched it in the PR I have to update the CUDA packaging)
23:36:00
7 Jul 2024
@ornx:littledevil.clubornx joined the room.19:45:55
@ornx:littledevil.clubornx

this doesn't work (nvidia-smi says my card is there etc). am i holding it wrong or is it broken?

$ nix develop
[snip]
$ nvcc foo.cu
In file included from /nix/store/fydjj6z3nyi1ywqbzzw7ai12ncjx9kwy-cuda-merged-12.2/include/cuda_runtime.h:82,
                 from <command-line>:
/nix/store/fydjj6z3nyi1ywqbzzw7ai12ncjx9kwy-cuda-merged-12.2/include/crt/host_config.h:143:2: error: #error -- unsupported GNU version! gcc versions later than 12 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
  143 | #error -- unsupported GNU version! gcc versions later than 12 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
      |  ^~~~~

flake.nix i am using as shell:

{
  description = "cuda development environment";
  inputs = {
    nixpkgs = {
      url = "github:NixOS/nixpkgs/4284c2b73c8bce4b46a6adf23e16d9e2ec8da4bb";
    };
  };
  outputs = { self, nixpkgs }:
    let
      system = "x86_64-linux";
      pkgs = import nixpkgs {
        inherit system;
        config.allowUnfree = true;
        config.cudaSupport = true;
      };
    in {
      devShells.${system}.default = pkgs.mkShell {
        buildInputs = with pkgs; [
          cudatoolkit linuxPackages.nvidia_x11
          cudaPackages.cudnn
          libGLU libGL
          xorg.libXi xorg.libXmu freeglut
          xorg.libXext xorg.libX11 xorg.libXv xorg.libXrandr zlib 
          ncurses5 stdenv.cc binutils
        ];

        shellHook = ''
              export LD_LIBRARY_PATH="${pkgs.linuxPackages.nvidia_x11}/lib"
          '';          
      };
    };
}
19:47:46
@aidalgol:matrix.orgaidalgol Maybe leave out stdenv.cc from the mkShell inputs? 19:50:57
@ornx:littledevil.clubornxno such luck, same error19:53:36

Show newer messages


Back to Room ListRoom Version: 9