about summary refs log tree commit diff
path: root/pkgs/development/python-modules/torch/tests.nix
blob: 76b901cbcea913fe467698a0ab8b9e941e350b75 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
  callPackage,
  torchWithCuda,
  torchWithRocm,
}:

{
  # To perform the runtime check use either
  # `nix run .#python3Packages.torch.tests.tester-cudaAvailable` (outside the sandbox), or
  # `nix build .#python3Packages.torch.tests.tester-cudaAvailable.gpuCheck` (in a relaxed sandbox)
  tester-cudaAvailable = callPackage ./mk-runtime-check.nix {
    feature = "cuda";
    versionAttr = "cuda";
    torch = torchWithCuda;
  };
  tester-rocmAvailable = callPackage ./mk-runtime-check.nix {
    feature = "rocm";
    versionAttr = "hip";
    torch = torchWithRocm;
  };
}