!eWOErHSaiddIbsUNsJ:nixos.org

NixOS CUDA

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

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


SenderMessageTime
15 Dec 2024
@sielicki:matrix.orgsielicki

SomeoneSerge (utc+3): connor (he/him) (UTC-7): I spent some time revamping my personal flake today/yesterday and now have a better understanding of the new hostPlatform/buildPlatform stuff, alongside lib.platforms

I do think it's the right interface long-term for both cudaSupport, gencodes, and also configuring fabrics.

The entire extent of my contributions to nixpkgs has been just doing small contributions to specific packages. I want to write up a small doc proposing this and discussing the migration path, but also wanted to collaborate w/ you guys. I don't even know where to post this, do I just open an issue on gh or does it need to go on the discourse?

21:18:06
16 Dec 2024
@connorbaker:matrix.orgconnor (burnt/out) (UTC-8)I'd recommend testing the waters and getting a sense of prior art done in terms of extending those; perhaps the folks in the Nixpkgs Stdenv room would be good to reach out to? https://matrix.to/#/#stdenv:nixos.org After that (and you've gotten a list of people interested in or knowledgeable about such work), I think drafting an RFC would be the next step, to fully lay out the plan for design and implementation. If it's a relatively small change, maybe an RFC is unnecessary and a PR would be fine!06:55:30
@ss:someonex.netSomeoneSerge (back on matrix)

That's the reason I've lately been ignoring flakes in personal projects: just stick to impure eval and autocalling. For me it's usually going in the direction of

{ nixpkgs ? <nixpkgs>
, pkgs ? import nixpkgs { inherit config; }
, lib ? pkgs.lib
, cudaSupport ? false
, config ? { inherit cudaSupport; }
}:

lib.makeScope pkgs.newScope (self: {
 # ...
})
14:45:04
@ss:someonex.netSomeoneSerge (back on matrix) *

That's the reason I've lately been ignoring flakes in personal projects: just stick to impure eval and autocalling. For me it's usually going in the direction of

{ nixpkgs ? <nixpkgs>
, pkgs ? import nixpkgs { inherit config; }
, lib ? pkgs.lib
, cudaSupport ? false
, config ? { inherit cudaSupport; }
}:

lib.makeScope pkgs.newScope (self: {
 # ...
})
14:45:18
@matthewcroughan:defenestrate.itmatthewcroughan @fosdemI actually ended up with a good pattern using flake.parts14:45:28
@matthewcroughan:defenestrate.itmatthewcroughan @fosdem
      perSystem = { system, ... }: {
        _module.args.rocmPkgs = import inputs.nixpkgs {
          overlays = [
            inputs.self.overlays.default
            (self: super: {
              python3 = super.python3.override {
                packageOverrides = self: super: { torch = super.torch-bin; };
              };
            })
          ];
          config.allowUnfree = true;
          config.rocmSupport = true;
          inherit system;
        };
        _module.args.nvidiaPkgs = import inputs.nixpkgs {
          overlays = [
            inputs.self.overlays.default
          ];
          config.allowUnfree = true;
          config.cudaSupport = true;
          inherit system;
        };
        _module.args.pkgs = import inputs.nixpkgs {
          overlays = [
            inputs.self.overlays.default
          ];
          config.allowUnfree = true;
          inherit system;
        };
      };

14:46:22
@matthewcroughan:defenestrate.itmatthewcroughan @fosdem *
      perSystem = { system, ... }: {
        _module.args.rocmPkgs = import inputs.nixpkgs {
          overlays = [
            inputs.self.overlays.default
            (self: super: {
              python3 = super.python3.override {
                packageOverrides = self: super: { torch = super.torch-bin; };
              };
            })
          ];
          config.allowUnfree = true;
          config.rocmSupport = true;
          inherit system;
        };
        _module.args.nvidiaPkgs = import inputs.nixpkgs {
          overlays = [
            inputs.self.overlays.default
          ];
          config.allowUnfree = true;
          config.cudaSupport = true;
          inherit system;
        };
        _module.args.pkgs = import inputs.nixpkgs {
          overlays = [
            inputs.self.overlays.default
          ];
          config.allowUnfree = true;
          inherit system;
        };
      };

14:46:27

Show newer messages


Back to Room ListRoom Version: 9