Merge pull request #188984 from mweinelt/torch

Changed files
+103 -99
pkgs
development
ocaml-modules
torch
python-modules
boxx
coqui-trainer
deepwave
elegy
ezyrb
functorch
ignite
monai
py-deprecate
pymanopt
pyro-ppl
pytorch-lightning
pytorch-metric-learning
pytorch-pfn-extras
pywick
qiskit-machine-learning
rising
skorch
slicer
spacy-transformers
stanza
tensorboardx
test-tube
torch
torch-tb-profiler
torchaudio
torchgpipe
torchinfo
torchmetrics
torchvision
transformers
wandb
tools
audio
top-level
+5 -5
pkgs/development/ocaml-modules/torch/default.nix
···
, ppx_sexp_conv
, sexplib
, stdio
-
, pytorch
+
, torch
}:
buildDunePackage rec {
···
ctypes
npy
ocaml-compiler-libs
-
pytorch
-
pytorch.dev
ppx_custom_printf
ppx_expect
ppx_sexp_conv
sexplib
stdio
+
torch
+
torch.dev
];
-
preBuild = "export LIBTORCH=${pytorch.dev}/";
+
preBuild = "export LIBTORCH=${torch.dev}/";
doCheck = !stdenv.isAarch64;
checkPhase = "dune runtest";
···
description = "Ocaml bindings to Pytorch";
maintainers = [ maintainers.bcdarwin ];
license = licenses.asl20;
-
broken = lib.versionAtLeast pytorch.version "1.11";
+
broken = lib.versionAtLeast torch.version "1.11";
};
}
+2 -2
pkgs/development/python-modules/boxx/default.nix
···
, fn
, pyopengl
, seaborn
-
, pytorch
+
, torch
, pythonOlder
, torchvision
}:
···
checkInputs = [
xvfb-run
-
pytorch
+
torch
torchvision
];
+2 -2
pkgs/development/python-modules/coqui-trainer/default.nix
···
, coqpit
, fsspec
-
, pytorch-bin
+
, torch-bin
, tensorboardx
, protobuf
···
propagatedBuildInputs = [
coqpit
fsspec
-
pytorch-bin
+
torch-bin
soundfile
tensorboardx
protobuf
+2 -2
pkgs/development/python-modules/deepwave/default.nix
···
{ lib
, buildPythonPackage
, fetchFromGitHub
-
, pytorch
+
, torch
, ninja
, scipy
, which
···
export HOME=$(mktemp -d)
'';
-
propagatedBuildInputs = [ pytorch pybind11 ];
+
propagatedBuildInputs = [ torch pybind11 ];
checkInputs = [
which
+2 -2
pkgs/development/python-modules/elegy/default.nix
···
, lib
, poetry
, pytestCheckHook
-
, pytorch
+
, torch
, pyyaml
, sh
, tables
···
checkInputs = [
pytestCheckHook
-
pytorch
+
torch
sh
tensorflow
];
+2 -2
pkgs/development/python-modules/ezyrb/default.nix
···
, scipy
, matplotlib
, scikit-learn
-
, pytorch
+
, torch
, pytestCheckHook
}:
···
scipy
matplotlib
scikit-learn
-
pytorch
+
torch
];
checkInputs = [
+2 -2
pkgs/development/python-modules/functorch/default.nix
···
, ninja
, pytestCheckHook
, python
-
, pytorch
+
, torch
, pybind11
, which
}:
···
# `setup.py` imports `torch.utils.cpp_extension`.
nativeBuildInputs = [
ninja
-
pytorch
+
torch
which
];
+2 -2
pkgs/development/python-modules/ignite/default.nix
···
, matplotlib
, mock
, packaging
-
, pytorch
+
, torch
, scikit-learn
, tqdm
}:
···
};
checkInputs = [ pytestCheckHook matplotlib mock pytest-xdist torchvision ];
-
propagatedBuildInputs = [ packaging pytorch scikit-learn tqdm ];
+
propagatedBuildInputs = [ packaging torch scikit-learn tqdm ];
# runs succesfully in 3.9, however, async isn't correctly closed so it will fail after test suite.
doCheck = pythonOlder "3.9";
+2 -2
pkgs/development/python-modules/monai/default.nix
···
, ignite
, numpy
, pybind11
-
, pytorch
+
, torch
, which
}:
···
nativeBuildInputs = [ ninja which ];
buildInputs = [ pybind11 ];
-
propagatedBuildInputs = [ numpy pytorch ignite ];
+
propagatedBuildInputs = [ numpy torch ignite ];
BUILD_MONAI = 1;
-1
pkgs/development/python-modules/py-deprecate/default.nix
···
, fetchFromGitHub
, pytestCheckHook
, scikit-learn
-
, pytorch
}:
let
+2 -2
pkgs/development/python-modules/pymanopt/default.nix
···
, buildPythonPackage
, numpy
, scipy
-
, pytorch
+
, torch
, autograd
, nose2
, matplotlib
···
sha256 = "sha256-dqyduExNgXIbEFlgkckaPfhLFSVLqPgwAOyBUdowwiQ=";
};
-
propagatedBuildInputs = [ numpy scipy pytorch ];
+
propagatedBuildInputs = [ numpy scipy torch ];
checkInputs = [ nose2 autograd matplotlib tensorflow ];
checkPhase = ''
+2 -2
pkgs/development/python-modules/pyro-ppl/default.nix
···
, pillow
, pyro-api
, pythonOlder
-
, pytorch
+
, torch
, scikit-learn
, seaborn
, torchvision
···
propagatedBuildInputs = [
pyro-api
-
pytorch
+
torch
networkx
opt-einsum
tqdm
+2 -2
pkgs/development/python-modules/pytorch-lightning/default.nix
···
, fsspec
, packaging
, pytestCheckHook
-
, pytorch
+
, torch
, pyyaml
, tensorboard
, torchmetrics
···
packaging
future
fsspec
-
pytorch
+
torch
pyyaml
tensorboard
torchmetrics
+2 -2
pkgs/development/python-modules/pytorch-metric-learning/default.nix
···
, numpy
, scikit-learn
, pytestCheckHook
-
, pytorch
+
, torch
, torchvision
, tqdm
, faiss
···
propagatedBuildInputs = [
numpy
-
pytorch
+
torch
scikit-learn
torchvision
tqdm
+2 -2
pkgs/development/python-modules/pytorch-pfn-extras/default.nix
···
, onnx
, packaging
, pytestCheckHook
-
, pytorch
+
, torch
, torchvision
, typing-extensions
}:
···
sha256 = "sha256-w4WSEgNLdVLDnKS4kzJBK9BkrrGzbk2aCIhk4HCM/Bk=";
};
-
propagatedBuildInputs = [ numpy packaging pytorch typing-extensions ];
+
propagatedBuildInputs = [ numpy packaging torch typing-extensions ];
checkInputs = [ onnx pytestCheckHook torchvision ];
+2 -2
pkgs/development/python-modules/pytorch/bin.nix pkgs/development/python-modules/torch/bin.nix
···
in buildPythonPackage {
inherit version;
-
pname = "pytorch";
-
# Don't forget to update pytorch to the same version.
+
pname = "torch";
+
# Don't forget to update torch to the same version.
format = "wheel";
+1 -1
pkgs/development/python-modules/pytorch/binary-hashes.nix pkgs/development/python-modules/torch/binary-hashes.nix
···
-
# Warning: use the same CUDA version as pytorch-bin.
+
# Warning: use the same CUDA version as torch-bin.
#
# Precompiled wheels can be found at:
# https://download.pytorch.org/whl/torch_stable.html
pkgs/development/python-modules/pytorch/breakpad-sigstksz.patch pkgs/development/python-modules/torch/breakpad-sigstksz.patch
+2 -2
pkgs/development/python-modules/pytorch/default.nix pkgs/development/python-modules/torch/default.nix
···
"LD_LIBRARY_PATH=${cudaStub}\${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH ";
in buildPythonPackage rec {
-
pname = "pytorch";
-
# Don't forget to update pytorch-bin to the same version.
+
pname = "torch";
+
# Don't forget to update torch-bin to the same version.
version = "1.11.0";
format = "setuptools";
pkgs/development/python-modules/pytorch/prefetch.sh pkgs/development/python-modules/torch/prefetch.sh
pkgs/development/python-modules/pytorch/pthreadpool-disable-gcd.diff pkgs/development/python-modules/torch/pthreadpool-disable-gcd.diff
+2 -2
pkgs/development/python-modules/pywick/default.nix
···
, pandas
, pillow
, six
-
, pytorch
+
, torch
, torchvision
, tqdm
, lib
···
};
propagatedBuildInputs = [
-
h5py hickle numpy pandas pillow six pytorch torchvision tqdm
+
h5py hickle numpy pandas pillow six torch torchvision tqdm
];
checkInputs = [ pytest ];
+2 -2
pkgs/development/python-modules/qiskit-machine-learning/default.nix
···
, sparse
# Optional inputs
, withTorch ? true
-
, pytorch
+
, torch
# Check Inputs
, pytestCheckHook
, ddt
···
qiskit-terra
scikit-learn
sparse
-
] ++ lib.optional withTorch pytorch;
+
] ++ lib.optional withTorch torch;
doCheck = false; # TODO: enable. Tests fail on unstable due to some multithreading issue?
checkInputs = [
+2 -2
pkgs/development/python-modules/rising/default.nix
···
, pytest-cov
, dill
, numpy
-
, pytorch
+
, torch
, threadpoolctl
, tqdm
}:
···
sha256 = "15wYWToXRae1cMpHWbJwzAp0THx6ED9ixQgL+n1v9PI=";
};
-
propagatedBuildInputs = [ numpy pytorch threadpoolctl tqdm ];
+
propagatedBuildInputs = [ numpy torch threadpoolctl tqdm ];
checkInputs = [ dill pytest-cov pytestCheckHook ];
disabledTests = [ "test_affine" ]; # deprecated division operator '/'
+2 -2
pkgs/development/python-modules/skorch/default.nix
···
, flaky
, numpy
, pandas
-
, pytorch
+
, torch
, scikit-learn
, scipy
, tabulate
···
sha256 = "b35cb4e50045742f0ffcfad33044af691d5d36b50212573753a804483a947ca9";
};
-
propagatedBuildInputs = [ numpy pytorch scikit-learn scipy tabulate tqdm ];
+
propagatedBuildInputs = [ numpy torch scikit-learn scipy tabulate tqdm ];
checkInputs = [ pytest pytest-cov flaky pandas pytestCheckHook ];
disabledTests = [
+2 -2
pkgs/development/python-modules/slicer/default.nix
···
, isPy27
, pytestCheckHook
, pandas
-
, pytorch
+
, torch
, scipy
}:
···
sha256 = "f5d5f7b45f98d155b9c0ba6554fa9770c6b26d5793a3e77a1030fb56910ebeec";
};
-
checkInputs = [ pytestCheckHook pandas pytorch scipy ];
+
checkInputs = [ pytestCheckHook pandas torch scipy ];
disabledTests = [
# IndexError: too many indices for array
+2 -2
pkgs/development/python-modules/spacy-transformers/default.nix
···
, fetchPypi
, buildPythonPackage
, dataclasses
-
, pytorch
+
, torch
, pythonOlder
, spacy
, spacy-alignments
···
};
propagatedBuildInputs = [
-
pytorch
+
torch
spacy
spacy-alignments
srsly
+2 -2
pkgs/development/python-modules/stanza/default.nix
···
, protobuf
, requests
, six
-
, pytorch
+
, torch
, tqdm
}:
···
protobuf
requests
six
-
pytorch
+
torch
tqdm
];
+2 -2
pkgs/development/python-modules/tensorboardx/default.nix
···
, pillow
, protobuf3_8
, pytestCheckHook
-
, pytorch
+
, torch
, six
, soundfile
, tensorboard
···
moto
pillow
pytestCheckHook
-
pytorch
+
torch
tensorboard
torchvision
];
+2 -2
pkgs/development/python-modules/test-tube/default.nix
···
, imageio
, numpy
, pandas
-
, pytorch
+
, torch
, tensorboard
}:
···
imageio
numpy
pandas
-
pytorch
+
torch
tensorboard
];
+2 -2
pkgs/development/python-modules/torch-tb-profiler/default.nix
···
, lib
, pandas
, pytestCheckHook
-
, pytorch
+
, torch
, tensorboard
, torchvision
}:
···
propagatedBuildInputs = [ pandas tensorboard ];
-
checkInputs = [ pytestCheckHook pytorch torchvision ];
+
checkInputs = [ pytestCheckHook torch torchvision ];
disabledTests = [
# Tests that attempt to access the filesystem in naughty ways.
+3 -3
pkgs/development/python-modules/torchaudio/bin.nix
···
, isPy39
, isPy310
, python
-
, pytorch-bin
+
, torch-bin
, pythonOlder
, pythonAtLeast
}:
···
disabled = !(isPy37 || isPy38 || isPy39 || isPy310);
propagatedBuildInputs = [
-
pytorch-bin
+
torch-bin
];
# The wheel-binary is not stripped to avoid the error of `ImportError: libtorch_cuda_cpp.so: ELF load command address/offset not properly aligned.`.
···
# Note: after patchelf'ing, libcudart can still not be found. However, this should
# not be an issue, because PyTorch is loaded before torchvision and brings
# in the necessary symbols.
-
patchelf --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}:${pytorch-bin}/${python.sitePackages}/torch/lib:" \
+
patchelf --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}:${torch-bin}/${python.sitePackages}/torch/lib:" \
"$out/${python.sitePackages}/torchaudio/_torchaudio.so"
'';
+1 -1
pkgs/development/python-modules/torchaudio/binary-hashes.nix
···
-
# Warning: Need to update at the same time as pytorch-bin
+
# Warning: Need to update at the same time as torch-bin
#
# Precompiled wheels can be found at:
# https://download.pytorch.org/whl/torch_stable.html
+2 -2
pkgs/development/python-modules/torchgpipe/default.nix
···
, isPy27
, pytest-runner
, pytestCheckHook
-
, pytorch
+
, torch
}:
buildPythonPackage rec {
···
sha256 = "0ki0njhmz1i3pkpr3y6h6ac7p5qh1kih06mknc2s18mfw34f2l55";
};
-
propagatedBuildInputs = [ pytorch ];
+
propagatedBuildInputs = [ torch ];
checkInputs = [ pytest-runner pytestCheckHook ];
disabledTests = [
+2 -2
pkgs/development/python-modules/torchinfo/default.nix
···
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
-
, pytorch
+
, torch
, torchvision
}:
···
};
propagatedBuildInputs = [
-
pytorch
+
torch
torchvision
];
+2 -2
pkgs/development/python-modules/torchmetrics/default.nix
···
, packaging
, psutil
, py-deprecate
-
, pytorch
+
, torch
, pytestCheckHook
, torchmetrics
, pytorch-lightning
···
# Let the user bring their own instance
buildInputs = [
-
pytorch
+
torch
];
checkInputs = [
+3 -3
pkgs/development/python-modules/torchvision/bin.nix
···
, patchelf
, pillow
, python
-
, pytorch-bin
+
, torch-bin
}:
let
···
propagatedBuildInputs = [
pillow
-
pytorch-bin
+
torch-bin
];
# The wheel-binary is not stripped to avoid the error of `ImportError: libtorch_cuda_cpp.so: ELF load command address/offset not properly aligned.`.
···
# Note: after patchelf'ing, libcudart can still not be found. However, this should
# not be an issue, because PyTorch is loaded before torchvision and brings
# in the necessary symbols.
-
patchelf --set-rpath "${rpath}:${pytorch-bin}/${python.sitePackages}/torch/lib:" \
+
patchelf --set-rpath "${rpath}:${torch-bin}/${python.sitePackages}/torch/lib:" \
"$out/${python.sitePackages}/torchvision/_C.so"
'';
+1 -1
pkgs/development/python-modules/torchvision/binary-hashes.nix
···
-
# Warning: use the same CUDA version as pytorch-bin.
+
# Warning: use the same CUDA version as torch-bin.
#
# Precompiled wheels can be found at:
# https://download.pytorch.org/whl/torch_stable.html
+5 -5
pkgs/development/python-modules/torchvision/default.nix
···
, numpy
, scipy
, pillow
-
, pytorch
+
, torch
, pytest
-
, cudaSupport ? pytorch.cudaSupport or false # by default uses the value from pytorch
+
, cudaSupport ? torch.cudaSupport or false # by default uses the value from torch
}:
let
-
inherit (pytorch.cudaPackages) cudatoolkit cudnn;
+
inherit (torch.cudaPackages) cudatoolkit cudnn;
cudatoolkit_joined = symlinkJoin {
name = "${cudatoolkit.name}-unsplit";
paths = [ cudatoolkit.out cudatoolkit.lib ];
};
-
cudaArchStr = lib.optionalString cudaSupport lib.strings.concatStringsSep ";" pytorch.cudaArchList;
+
cudaArchStr = lib.optionalString cudaSupport lib.strings.concatStringsSep ";" torch.cudaArchList;
in buildPythonPackage rec {
pname = "torchvision";
version = "0.13.0";
···
buildInputs = [ libjpeg_turbo libpng ]
++ lib.optionals cudaSupport [ cudnn ];
-
propagatedBuildInputs = [ numpy pillow pytorch scipy ];
+
propagatedBuildInputs = [ numpy pillow torch scipy ];
preBuild = lib.optionalString cudaSupport ''
export TORCH_CUDA_ARCH_LIST="${cudaArchStr}"
+2 -2
pkgs/development/python-modules/transformers/default.nix
···
, scikit-learn
, pillow
, pyyaml
-
, pytorch
+
, torch
, tokenizers
, tqdm
}:
···
# tf2onnx
];
torch = [
-
pytorch
+
torch
];
tokenizers = [
tokenizers
+2 -2
pkgs/development/python-modules/wandb/default.nix
···
, pytestCheckHook
, python-dateutil
, pythonOlder
-
, pytorch
+
, torch
, pyyaml
, requests
, scikit-learn
···
pytest-mock
pytest-xdist
pytestCheckHook
-
pytorch
+
torch
scikit-learn
tqdm
];
+1 -1
pkgs/tools/audio/tts/default.nix
···
pandas
pypinyin
pysbd
-
pytorch-bin
pyworld
scipy
soundfile
tensorflow
+
torch-bin
torchaudio-bin
tqdm
umap-learn
+1 -1
pkgs/top-level/ocaml-packages.nix
···
tls-mirage = callPackage ../development/ocaml-modules/tls/mirage.nix { };
torch = callPackage ../development/ocaml-modules/torch {
-
inherit (pkgs.python3Packages) pytorch;
+
inherit (pkgs.python3Packages) torch;
};
ocaml-protoc = callPackage ../development/ocaml-modules/ocaml-protoc { };
+4
pkgs/top-level/python-aliases.nix
···
python-subunit = subunit; # added 2021-09-10
pytest_xdist = pytest-xdist; # added 2021-01-04
python_simple_hipchat = python-simple-hipchat; # added 2021-07-21
+
pytorch = torch; # added 2022-09-30
+
pytorch-bin = torch-bin; # added 2022-09-30
+
pytorchWithCuda = torchWithCuda; # added 2022-09-30
+
pytorchWithoutCuda = torchWithoutCuda; # added 2022-09-30
pytwitchapi = twitchapi; # added 2022-03-07
qasm2image = throw "qasm2image is no longer maintained (since November 2018), and is not compatible with the latest pythonPackages.qiskit versions."; # added 2020-12-09
qiskit-aqua = throw "qiskit-aqua has been removed due to deprecation, with its functionality moved to different qiskit packages";
+17 -16
pkgs/top-level/python-packages.nix
···
pytools = callPackage ../development/python-modules/pytools { };
-
pytorch = callPackage ../development/python-modules/pytorch {
-
cudaSupport = pkgs.config.cudaSupport or false;
-
inherit (pkgs.darwin.apple_sdk.frameworks) CoreServices;
-
inherit (pkgs.darwin) libobjc;
-
};
-
-
pytorch-bin = callPackage ../development/python-modules/pytorch/bin.nix { };
-
pytorch-lightning = callPackage ../development/python-modules/pytorch-lightning { };
pytorch-metric-learning = callPackage ../development/python-modules/pytorch-metric-learning { };
pytorch-pfn-extras = callPackage ../development/python-modules/pytorch-pfn-extras { };
-
-
pytorchWithCuda = self.pytorch.override {
-
cudaSupport = true;
-
};
-
-
pytorchWithoutCuda = self.pytorch.override {
-
cudaSupport = false;
-
};
pytraccar = callPackage ../development/python-modules/pytraccar { };
···
toonapi = callPackage ../development/python-modules/toonapi { };
toposort = callPackage ../development/python-modules/toposort { };
+
+
torch = callPackage ../development/python-modules/torch {
+
cudaSupport = pkgs.config.cudaSupport or false;
+
inherit (pkgs.darwin.apple_sdk.frameworks) CoreServices;
+
inherit (pkgs.darwin) libobjc;
+
};
+
+
torch-bin = callPackage ../development/python-modules/torch/bin.nix { };
+
+
+
torchWithCuda = self.torch.override {
+
cudaSupport = true;
+
};
+
+
torchWithoutCuda = self.torch.override {
+
cudaSupport = false;
+
};
torch-tb-profiler = callPackage ../development/python-modules/torch-tb-profiler/default.nix { };
+1 -1
pkgs/top-level/release-cuda.nix
···
python3.pkgs.libgpuarray = linux;
python3.pkgs.tensorflowWithCuda = linux;
python3.pkgs.pyrealsense2WithCuda = linux;
-
python3.pkgs.pytorchWithCuda = linux;
+
python3.pkgs.torchWithCuda = linux;
python3.pkgs.jaxlib = linux;
}) // (genAttrs packageSets evalPackageSet));