cudaPackages.saxpy: passthru: test gpu/runtime

This commit is contained in:
Someone Serge 2023-11-21 20:48:09 +00:00
parent 927b15ed6d
commit 9aa0403154

View File

@ -3,6 +3,7 @@
cmake,
cudaPackages,
lib,
saxpy,
}:
let
inherit (cudaPackages)
@ -58,6 +59,16 @@ backendStdenv.mkDerivation {
(lib.cmakeFeature "CMAKE_CUDA_ARCHITECTURES" flags.cmakeCudaArchitecturesString)
];
passthru.tests.withCuda = saxpy.overrideAttrs (
_: {
requiredSystemFeatures = ["cuda"];
doInstallCheck = true;
postInstallCheck = ''
$out/bin/saxpy
'';
}
);
meta = rec {
description = "Simple (Single-precision AX Plus Y) FindCUDAToolkit.cmake example for testing cross-compilation";
license = lib.licenses.mit;