summary refs log tree commit diff
path: root/pkgs/top-level/linux-kernels.nix
diff options
context:
space:
mode:
authorEdward Tjörnhammar <ed@cflags.cc>2023-09-11 16:37:26 +0200
committerEdward Tjörnhammar <ed@cflags.cc>2023-09-12 07:17:33 +0200
commit9b95f21cdb383f56c5a769240c946ef376778fb9 (patch)
tree61c3d244f5f24fe00b13819dbd388f42a525a583 /pkgs/top-level/linux-kernels.nix
parent23e69f92c8a5d3898d4cb51373479382f3a9b10e (diff)
downloadnixpkgs-9b95f21cdb383f56c5a769240c946ef376778fb9.tar
nixpkgs-9b95f21cdb383f56c5a769240c946ef376778fb9.tar.gz
nixpkgs-9b95f21cdb383f56c5a769240c946ef376778fb9.tar.bz2
nixpkgs-9b95f21cdb383f56c5a769240c946ef376778fb9.tar.lz
nixpkgs-9b95f21cdb383f56c5a769240c946ef376778fb9.tar.xz
nixpkgs-9b95f21cdb383f56c5a769240c946ef376778fb9.tar.zst
nixpkgs-9b95f21cdb383f56c5a769240c946ef376778fb9.zip
nvidia,nixos/nvidia: add datacenter drivers compatible with default cudaPkgs
For NVLink topology systems we need fabricmanager. Fabricmanager itself is
dependent on the datacenter driver set and not the regular x11 ones, it is also
tightly tied to the driver version. Furhtermore the current cudaPackages
defaults to version 11.8, which corresponds to the 520 datacenter drivers.

Future improvement should be to switch the main nvidia datacenter driver version
on the `config.cudaVersion` since these are well known from:

> https://docs.nvidia.com/deploy/cuda-compatibility/index.html#use-the-right-compat-package

This adds nixos configuration options `hardware.nvidia.datacenter.enable` and
`hardware.nvidia.datacenter.settings` (the settings configure fabricmanager)

Other interesting external links related to this commit are:

* Fabricmanager download site:
    - https://developer.download.nvidia.com/compute/cuda/redist/fabricmanager/linux-x86_64/
* Data Center drivers:
    - https://www.nvidia.com/Download/driverResults.aspx/193711/en-us/

Implementation specific details:

* Fabricmanager is added as a passthru package, similar to settings and
  presistenced.
* Adds `use{Settings,Persistenced,Fabricmanager}` with defaults to preserve x11
  expressions.
* Utilizes mkMerge to split the `hardware.nvidia` module into three comment
  delimited sections:
    1. Common
    2. X11/xorg
    3. Data Center
* Uses asserts to make the configurations mutualy exclusive.

Notes:

* Data Center Drivers are `x86_64` only.
* Reuses the `nvidia_x11` attribute in nixpkgs on enable, e.g. doesn't change it
  to `nvidia_driver` and sets that to either `nvidia_x11` or `nvidia_dc`.
* Should have a helper function which is switched on `config.cudaVersion` like
  `selectHighestVersion` but rather `selectCudaCompatibleVersion`.
Diffstat (limited to 'pkgs/top-level/linux-kernels.nix')
-rw-r--r--pkgs/top-level/linux-kernels.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix
index 96c95c819f6..07429cee853 100644
--- a/pkgs/top-level/linux-kernels.nix
+++ b/pkgs/top-level/linux-kernels.nix
@@ -410,6 +410,8 @@ in {
     nvidia_x11_legacy470   = nvidiaPackages.legacy_470;
     nvidia_x11_production  = nvidiaPackages.production;
     nvidia_x11_vulkan_beta = nvidiaPackages.vulkan_beta;
+    nvidia_dc              = nvidiaPackages.dc;
+    nvidia_dc_520          = nvidiaPackages.dc_520;
 
     # this is not a replacement for nvidia_x11*
     # only the opensource kernel driver exposed for hydra to build