!eWOErHSaiddIbsUNsJ:nixos.org

NixOS CUDA

290 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
9 Mar 2025
@ss:someonex.netSomeoneSerge (back on matrix)tomorrow 🙏23:37:06
11 Mar 2025
@ss:someonex.netSomeoneSerge (back on matrix)

RE: https://discourse.nixos.org/t/why-does-nixpkgs-config-exist/61456/6
RE: wrappers, stdenv, etc.
RE: "The easiest way to achieve consistency today is to just enable cudaSupport Nixpkgs-wide using config"

And yet again, I don't think it has to be this way. It's not inherent, it's just a trait of callPackage/makeScope and of overrides being local. To try and defend the notion of the hypothetical stdenv.cudaSupport, if all of a package's inputs consistently accepted stdenv as a parameter, and could be entirely configured just using stdenv, then all it'd take to achieve consistency is to apply .override { inherit stdenv; } to all *Inputs. And if we didn't limit ourselves to the idea of callPackage and that there's a global "container" from which we "fill in" our parameters, that could probably be automated (by doing dynamic scoping essentially)

But ok let's leave callPackage and scoping aside. This still made me think of how to layer nvcc-wrapper and the conditional stdenv functionality. I'm back to the notion that we actually can move cudaSupport to (the platform attrsets and) stdenv, replace optionals cudaSupport with optionals stdenv.cudaSupport, and implement cudaStdenv.mkDerivation in such a way that it would be able to downgrade the compiler if it detects that its argument is capable of using CUDA functionality. The detection could still be done in two ways: we could demand that derivations explicitly pass an argument such as, say, cudaCapable = true, or we could detect that nvcc is in its nativeBuildInputs. I'd vote for the former because llvm, nvc++, and it's more explicit too. The cudaStdenv constructor could be made configurable so that it's possible to disable the downgrading (e.g. when we don't care about consistency or the LTO and we just trust in the wrapper; or if llvm offers more relaxed constraints). And regardless of the stdenv layer, the lower-level nvcc wrapper can exist and be used independently.

CC connor (he/him) (UTC-8)

10:09:54
@connorbaker:matrix.orgconnor (he/him)I’ll have to get back to you on that after I get a chance to think about it14:26:20
@ruroruro:matrix.orgruro

I just wanted to make sure. You commented

H'm well it seems to make sense at least for

nix eval nixpkgs#cudaPackages.cudnn_8_0.brokenConditions
{ "CUDA version is too new" = true; ... }

Did I understand correctly, that you are okay with

  • moving cudnn.brokenConditions."CUDA version is too old/new" to badPlatformsConditions
  • moving nsight_systems.brokenConditions."CUDA too old (<11.8)" to badPlatformsConditions
  • moving nvidia_driver.brokenConditions."Package is not supported; use drivers from linuxPackages" to badPlatformsConditions
  • adding tensorrt.hydraPlatforms = none
    ?
19:19:31
@ruroruro:matrix.orgruro *

I just wanted to make sure. You commented

H'm well it seems to make sense at least for

nix eval nixpkgs#cudaPackages.cudnn_8_0.brokenConditions
{ "CUDA version is too new" = true; ... }

Did I understand correctly, that you are okay with

  • moving cudnn.brokenConditions."CUDA version is too old/new" to badPlatformsConditions
  • moving nsight_systems.brokenConditions."CUDA too old (<11.8)" to badPlatformsConditions
  • moving nvidia_driver.brokenConditions."Package is not supported; use drivers from linuxPackages" to badPlatformsConditions
  • adding tensorrt.hydraPlatforms = none

?

19:19:38
@ruroruro:matrix.orgruro *

I just wanted to make sure. You left this comment on the release-cuda issue:

H'm well it seems to make sense at least for

nix eval nixpkgs#cudaPackages.cudnn_8_0.brokenConditions
{ "CUDA version is too new" = true; ... }

Did I understand correctly, that you are okay with

  • moving cudnn.brokenConditions."CUDA version is too old/new" to badPlatformsConditions
  • moving nsight_systems.brokenConditions."CUDA too old (<11.8)" to badPlatformsConditions
  • moving nvidia_driver.brokenConditions."Package is not supported; use drivers from linuxPackages" to badPlatformsConditions
  • adding tensorrt.hydraPlatforms = none

?

19:20:16
@ruroruro:matrix.orgruro *

I just wanted to make sure. You left this comment on the release-cuda issue:

H'm well it seems to make sense at least for

nix eval nixpkgs#cudaPackages.cudnn_8_0.brokenConditions
{ "CUDA version is too new" = true; ... }

Did I understand correctly, that you are okay with

  • moving cudnn.brokenConditions."CUDA version is too old/new" to badPlatformsConditions
  • moving nsight_systems.brokenConditions."CUDA too old (<11.8)" to badPlatformsConditions
  • moving nvidia_driver.brokenConditions."Package is not supported; use drivers from linuxPackages" to badPlatformsConditions
  • adding tensorrt.hydraPlatforms = none

?

As I've mentioned, you can see the exact code I am talking about in this branch.

19:21:25
@ruroruro:matrix.orgruro *

I just wanted to make sure. You left this comment on the release-cuda issue:

H'm well it seems to make sense at least for

nix eval nixpkgs#cudaPackages.cudnn_8_0.brokenConditions
{ "CUDA version is too new" = true; ... }

Did I understand correctly, that you are okay with

  • moving cudnn.brokenConditions."CUDA version is too old/new" to badPlatformsConditions
  • moving nsight_systems.brokenConditions."CUDA too old (<11.8)" to badPlatformsConditions
  • moving nvidia_driver.brokenConditions."Package is not supported; use drivers from linuxPackages" to badPlatformsConditions
  • adding tensorrt.hydraPlatforms = none

?

As I've mentioned, you can see the exact code I am talking about in here.

19:22:37
@ruroruro:matrix.orgruro *

I just wanted to make sure. You left this comment on the release-cuda issue:

H'm well it seems to make sense at least for

nix eval nixpkgs#cudaPackages.cudnn_8_0.brokenConditions
{ "CUDA version is too new" = true; ... }

Did I understand correctly, that you are okay with

  • moving cudnn.brokenConditions."CUDA version is too old/new" to badPlatformsConditions
  • moving nsight_systems.brokenConditions."CUDA too old (<11.8)" to badPlatformsConditions
  • moving nvidia_driver.brokenConditions."Package is not supported; use drivers from linuxPackages" to badPlatformsConditions
  • adding tensorrt.hydraPlatforms = none

?

As I've mentioned, you can see the exact code I am talking about here.

19:22:44
@ruroruro:matrix.orgruro *

I just wanted to make sure. You left this comment on the release-cuda issue:

H'm well it seems to make sense at least for

nix eval nixpkgs#cudaPackages.cudnn_8_0.brokenConditions
{ "CUDA version is too new" = true; ... }

Did I understand correctly, that you are okay with

  • moving cudnn.brokenConditions."CUDA version is too old/new" to badPlatformsConditions
  • moving nsight_systems.brokenConditions."CUDA too old (<11.8)" to badPlatformsConditions
  • moving nvidia_driver.brokenConditions."Package is not supported; use drivers from linuxPackages" to badPlatformsConditions
  • setting tensorrt.hydraPlatforms = none (because it can't be built on Hydra)

?

As I've mentioned, you can see the exact code I am talking about here.

19:23:46
@ruroruro:matrix.orgruro *

I just wanted to make sure. You left this comment on the release-cuda issue:

H'm well it seems to make sense at least for

nix eval nixpkgs#cudaPackages.cudnn_8_0.brokenConditions
{ "CUDA version is too new" = true; ... }

Did I understand correctly, that you are okay with

  • moving cudnn.brokenConditions."CUDA version is too old/new" to badPlatformsConditions
  • moving nsight_systems.brokenConditions."CUDA too old (<11.8)" to badPlatformsConditions
  • moving nvidia_driver.brokenConditions."Package is not supported; use drivers from linuxPackages" to badPlatformsConditions
  • setting tensorrt.hydraPlatforms = none (because it can't be built on Hydra)

?

We can keep the Qt 5 missing (<2022.4.2.1)/Qt 6 missing (>=2022.4.2.1) as brokenConditions, because they aren't currently producing eval errors and it makes sense that we want to detect these conditions in CI.

As I've mentioned, you can see the exact code I am talking about here.

19:25:41
@ruroruro:matrix.orgruro *

I just wanted to make sure. You left this comment on the release-cuda issue:

H'm well it seems to make sense at least for

nix eval nixpkgs#cudaPackages.cudnn_8_0.brokenConditions
{ "CUDA version is too new" = true; ... }

Did I understand correctly, that you are okay with

  • moving cudnn.brokenConditions."CUDA version is too old/new" to badPlatformsConditions
  • moving nsight_systems.brokenConditions."CUDA too old (<11.8)" to badPlatformsConditions
  • moving nvidia_driver.brokenConditions."Package is not supported; use drivers from linuxPackages" to badPlatformsConditions
  • setting tensorrt.hydraPlatforms = none (because it can't be built on Hydra)

?

We can keep the Qt 5 missing (<2022.4.2.1)/Qt 6 missing (>=2022.4.2.1) as brokenConditions, because they aren't currently producing eval errors and it makes sense that we want to detect these conditions in CI.

As I've mentioned, you can see the exact changes I am talking about here.

19:25:54
@ruroruro:matrix.orgruro *

I just wanted to make sure. You left this comment on the release-cuda issue:

H'm well it seems to make sense at least for

nix eval nixpkgs#cudaPackages.cudnn_8_0.brokenConditions
{ "CUDA version is too new" = true; ... }

Did I understand correctly, that you are okay with

  • moving cudnn.brokenConditions."CUDA version is too old/new" to badPlatformsConditions
  • moving nsight_systems.brokenConditions."CUDA too old (<11.8)" to badPlatformsConditions
  • moving nvidia_driver.brokenConditions."Package is not supported; use drivers from linuxPackages" to badPlatformsConditions
  • setting tensorrt.hydraPlatforms = none (because it can't be built on Hydra)

?

We can keep the Qt 5 missing (<2022.4.2.1)/Qt 6 missing (>=2022.4.2.1) as brokenConditions, because they aren't currently producing eval errors and it makes sense that we want to detect these conditions in CI.

You can see the exact changes I am talking about here.

19:26:07
@ruroruro:matrix.orgruro *

I just wanted to make sure. You left this comment on the release-cuda issue:

change brokenConditions to badPlatformsConditions

H'm well it seems to make sense at least for

nix eval nixpkgs#cudaPackages.cudnn_8_0.brokenConditions
{ "CUDA version is too new" = true; ... }

Did I understand correctly, that you are okay with

  • moving cudnn.brokenConditions."CUDA version is too old/new" to badPlatformsConditions
  • moving nsight_systems.brokenConditions."CUDA too old (<11.8)" to badPlatformsConditions
  • moving nvidia_driver.brokenConditions."Package is not supported; use drivers from linuxPackages" to badPlatformsConditions
  • setting tensorrt.hydraPlatforms = none (because it can't be built on Hydra)

?

We can keep the Qt 5 missing (<2022.4.2.1)/Qt 6 missing (>=2022.4.2.1) as brokenConditions, because they aren't currently producing eval errors and it makes sense that we want to detect these conditions in CI.

You can see the exact changes I am talking about here.

19:28:07
@ruroruro:matrix.orgruro *

I just wanted to make sure. You left this comment on the release-cuda issue:

change brokenConditions to badPlatformsConditions

H'm well it seems to make sense at least for

nix eval nixpkgs#cudaPackages.cudnn_8_0.brokenConditions
{ "CUDA version is too new" = true; ... }

Did I understand correctly, that you are okay with

  • moving cudnn.brokenConditions."CUDA version is too old/new" to badPlatformsConditions
  • moving nsight_systems.brokenConditions."CUDA too old (<11.8)" to badPlatformsConditions
  • moving nvidia_driver.brokenConditions."Package is not supported; use drivers from linuxPackages" to badPlatformsConditions
  • setting tensorrt.hydraPlatforms = none (because it can't be built on Hydra)

?

You can see the exact changes I am talking about here.

We can keep the Qt 5 missing (<2022.4.2.1) / Qt 6 missing (>=2022.4.2.1) as brokenConditions, because they aren't currently producing eval errors and it makes sense that we want to detect these conditions in CI.

19:28:36
@ss:someonex.netSomeoneSerge (back on matrix) ruro: this sounds great! 22:02:03
@adam_neverwas:matrix.orgAdam Neverwas removed their display name adam_neverwas.23:24:15
@gumby0811:matrix.orggumby0811 set a profile picture.23:38:53
12 Mar 2025
@ruroruro:matrix.orgruro Any preferences on the alternative name for evalPackageSetPlatforms? ))) 00:42:04
@ruroruro:matrix.orgruro I am leaning towards packageSetPlatforms... 00:42:18
@ruroruro:matrix.orgruro * I am leaning towards just packageSetPlatforms... 00:42:32
@ss:someonex.netSomeoneSerge (back on matrix) stick: I was going through the missed notifications today and saw a whole bunch of merged cuda-related fixes and refactorings. That was nice:) 00:43:02
@ss:someonex.netSomeoneSerge (back on matrix) Well, looking at the file again, we have packageSets, so the platforms are also of multiple package set<b>s</b>, but that's inconvenient to type, so maybe psPlatforms? 00:51:57
@ss:someonex.netSomeoneSerge (back on matrix) And comparing to pkgs/top-level/release.nix they introduce packageJobs, but then just use the in-place map for pkgs 00:52:26
@ruroruro:matrix.orgruro Maybe packagePlatforms then? I mean... the attrset specifies the platforms for each package, not for each package set. 00:54:15
@ruroruro:matrix.orgruro * Maybe packagePlatforms then? I mean... this attrset specifies the platforms for each package, not for each package set. 00:54:23
@ruroruro:matrix.orgruro It's a bit unfortunate that packagePlatforms is a function in pkgs/top-level/release.nix, but eh... 00:56:23
@ruroruro:matrix.orgruroNvm00:56:47
@ruroruro:matrix.orgruro It's also a function inherited from release-lib 00:57:04
@ruroruro:matrix.orgruro * packagePlatforms is also a function inherited from release-lib 00:57:19

Show newer messages


Back to Room ListRoom Version: 9