Add cudainfo program to test CUDA
The cudainfo program checks that we can initialize the CUDA RT library and communicate with the driver. It can be used as standalone program or built with cudainfo.gpuCheck so it is executed inside the build sandbox to see if it also works fine. It uses the autoAddDriverRunpath hook to inject in the runpath the location of the library directory for CUDA libraries. Reviewed-by: Aleix Boné <abonerib@bsc.es>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ lib, config, ... }:
|
||||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
# Configure Nvidia driver to use with CUDA
|
||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.production;
|
||||
@@ -15,4 +15,6 @@
|
||||
programs.nix-required-mounts.allowedPatterns.nvidia-gpu.paths = [
|
||||
config.systemd.tmpfiles.settings.graphics-driver."/run/opengl-driver"."L+".argument
|
||||
];
|
||||
|
||||
environment.systemPackages = [ pkgs.cudainfo ];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user