summary refs log tree commit diff
path: root/pkgs/development/python-modules/torchgpipe/default.nix
blob: dbfad336d0f390e75180b2778edfaec0325b6428 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ lib
, buildPythonPackage
, fetchFromGitHub
, isPy27
, pytestrunner
, pytestCheckHook
, pytorch
}:

buildPythonPackage rec {
  pname = "torchgpipe";
  version = "0.0.7";

  disabled = isPy27;

  src = fetchFromGitHub {
    owner = "kakaobrain";
    repo = pname;
    rev = "v${version}";
    sha256 = "0ki0njhmz1i3pkpr3y6h6ac7p5qh1kih06mknc2s18mfw34f2l55";
  };

  propagatedBuildInputs = [ pytorch ];

  checkInputs = [ pytestrunner pytestCheckHook ];
  disabledTests = [
    "test_inplace_on_requires_grad"
    "test_input_requiring_grad"
  ];

  meta = with lib; {
    description = "GPipe implemented in Pytorch and optimized for CUDA rather than TPU";
    homepage = "https://torchgpipe.readthedocs.io";
    license = licenses.asl20;
    maintainers = [ maintainers.bcdarwin ];
  };
}