cudaPackages: move cuda tests from passthru.tests
Otherwise we crash Ofborg
This commit is contained in:
@@ -373,16 +373,16 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
done
|
||||
'';
|
||||
|
||||
cudaAvailable = runCommand
|
||||
};
|
||||
gpuChecks.cudaAvailable = { blenderWithCuda, runCommand }: runCommand
|
||||
"blender-cuda-available"
|
||||
{
|
||||
nativeBuildInputs = [ finalAttrs.finalPackage ];
|
||||
nativeBuildInputs = [ blenderWithCuda ];
|
||||
requiredSystemFeatures = [ "cuda" ];
|
||||
}
|
||||
''
|
||||
blender --background -noaudio --python-exit-code 1 --python ${./test-cuda.py} && touch $out
|
||||
'';
|
||||
};
|
||||
'' { };
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -59,7 +59,7 @@ backendStdenv.mkDerivation {
|
||||
(lib.cmakeFeature "CMAKE_CUDA_ARCHITECTURES" flags.cmakeCudaArchitecturesString)
|
||||
];
|
||||
|
||||
passthru.tests.withCuda = saxpy.overrideAttrs (
|
||||
passthru.gpuChecks.withCuda = saxpy.overrideAttrs (
|
||||
_: {
|
||||
requiredSystemFeatures = ["cuda"];
|
||||
doInstallCheck = true;
|
||||
|
||||
@@ -51,8 +51,7 @@ buildPythonPackage rec {
|
||||
# OSError: /run/opengl-driver/lib/libnvidia-ml.so.1: cannot open shared object file: No such file or directory
|
||||
doCheck = false;
|
||||
|
||||
passthru.tests.nvmlInit = callPackage ./test-gpu.nix { };
|
||||
|
||||
passthru.gpuChecks.nvmlInit = callPackage ./test-gpu.nix { };
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python bindings for the NVIDIA Management Library";
|
||||
|
||||
@@ -121,7 +121,7 @@ buildPythonPackage {
|
||||
|
||||
pythonImportsCheck = [ "torch" ];
|
||||
|
||||
passthru.tests.cudaAvailable = callPackage ./test-cuda.nix { torch = torch-bin; };
|
||||
passthru.gpuChecks.cudaAvailable = callPackage ./test-cuda.nix { torch = torch-bin; };
|
||||
|
||||
meta = {
|
||||
description = "PyTorch: Tensors and Dynamic neural networks in Python with strong GPU acceleration";
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
# tests.cudaAvailable:
|
||||
callPackage,
|
||||
torch,
|
||||
torchWithCuda,
|
||||
|
||||
# Native build inputs
|
||||
cmake,
|
||||
@@ -648,11 +648,7 @@ buildPythonPackage rec {
|
||||
blasProvider = blas.provider;
|
||||
# To help debug when a package is broken due to CUDA support
|
||||
inherit brokenConditions;
|
||||
} // lib.optionalAttrs cudaSupport {
|
||||
|
||||
tests = lib.optionalAttrs cudaSupport {
|
||||
cudaAvailable = callPackage ./test-cuda.nix { inherit torch; };
|
||||
};
|
||||
gpuChecks.cudaAvailable = callPackage ./test-cuda.nix { torch = torchWithCuda; };
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
Reference in New Issue
Block a user