diff --git a/pkgs/development/ocaml-modules/torch/default.nix b/pkgs/development/ocaml-modules/torch/default.nix index c4c80dacc9f2f..fd7036ac6c89e 100644 --- a/pkgs/development/ocaml-modules/torch/default.nix +++ b/pkgs/development/ocaml-modules/torch/default.nix @@ -12,7 +12,7 @@ , ppx_sexp_conv , sexplib , stdio -, pytorch +, torch }: buildDunePackage rec { @@ -37,16 +37,16 @@ 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"; @@ -56,6 +56,6 @@ buildDunePackage rec { 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"; }; } diff --git a/pkgs/development/python-modules/boxx/default.nix b/pkgs/development/python-modules/boxx/default.nix index f8ab26fae1716..469f2af96f72a 100644 --- a/pkgs/development/python-modules/boxx/default.nix +++ b/pkgs/development/python-modules/boxx/default.nix @@ -12,7 +12,7 @@ , fn , pyopengl , seaborn -, pytorch +, torch , pythonOlder , torchvision }: @@ -43,7 +43,7 @@ buildPythonPackage rec { checkInputs = [ xvfb-run - pytorch + torch torchvision ]; diff --git a/pkgs/development/python-modules/coqui-trainer/default.nix b/pkgs/development/python-modules/coqui-trainer/default.nix index d997798f783eb..d78a7b07088c1 100644 --- a/pkgs/development/python-modules/coqui-trainer/default.nix +++ b/pkgs/development/python-modules/coqui-trainer/default.nix @@ -6,7 +6,7 @@ , coqpit , fsspec -, pytorch-bin +, torch-bin , tensorboardx , protobuf @@ -33,7 +33,7 @@ buildPythonPackage { propagatedBuildInputs = [ coqpit fsspec - pytorch-bin + torch-bin soundfile tensorboardx protobuf diff --git a/pkgs/development/python-modules/deepwave/default.nix b/pkgs/development/python-modules/deepwave/default.nix index 0e5e9b4566128..f69c386047dbc 100644 --- a/pkgs/development/python-modules/deepwave/default.nix +++ b/pkgs/development/python-modules/deepwave/default.nix @@ -1,7 +1,7 @@ { lib , buildPythonPackage , fetchFromGitHub -, pytorch +, torch , ninja , scipy , which @@ -48,7 +48,7 @@ buildPythonPackage rec { export HOME=$(mktemp -d) ''; - propagatedBuildInputs = [ pytorch pybind11 ]; + propagatedBuildInputs = [ torch pybind11 ]; checkInputs = [ which diff --git a/pkgs/development/python-modules/elegy/default.nix b/pkgs/development/python-modules/elegy/default.nix index a4d17a830e4d3..f4e3249755c77 100644 --- a/pkgs/development/python-modules/elegy/default.nix +++ b/pkgs/development/python-modules/elegy/default.nix @@ -8,7 +8,7 @@ , lib , poetry , pytestCheckHook -, pytorch +, torch , pyyaml , sh , tables @@ -66,7 +66,7 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook - pytorch + torch sh tensorflow ]; diff --git a/pkgs/development/python-modules/ezyrb/default.nix b/pkgs/development/python-modules/ezyrb/default.nix index dc46bcfcd9575..7730c1fe8e85c 100644 --- a/pkgs/development/python-modules/ezyrb/default.nix +++ b/pkgs/development/python-modules/ezyrb/default.nix @@ -8,7 +8,7 @@ , scipy , matplotlib , scikit-learn -, pytorch +, torch , pytestCheckHook }: @@ -32,7 +32,7 @@ buildPythonPackage rec { scipy matplotlib scikit-learn - pytorch + torch ]; checkInputs = [ diff --git a/pkgs/development/python-modules/functorch/default.nix b/pkgs/development/python-modules/functorch/default.nix index 53860d2c2b493..033f0a3b4fdad 100644 --- a/pkgs/development/python-modules/functorch/default.nix +++ b/pkgs/development/python-modules/functorch/default.nix @@ -5,7 +5,7 @@ , ninja , pytestCheckHook , python -, pytorch +, torch , pybind11 , which }: @@ -26,7 +26,7 @@ buildPythonPackage rec { # `setup.py` imports `torch.utils.cpp_extension`. nativeBuildInputs = [ ninja - pytorch + torch which ]; diff --git a/pkgs/development/python-modules/ignite/default.nix b/pkgs/development/python-modules/ignite/default.nix index 9898ef4b3d52e..fae5a8abf034b 100644 --- a/pkgs/development/python-modules/ignite/default.nix +++ b/pkgs/development/python-modules/ignite/default.nix @@ -8,7 +8,7 @@ , matplotlib , mock , packaging -, pytorch +, torch , scikit-learn , tqdm }: @@ -25,7 +25,7 @@ buildPythonPackage rec { }; 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"; diff --git a/pkgs/development/python-modules/monai/default.nix b/pkgs/development/python-modules/monai/default.nix index 83b55ad55841a..82e984b8dfae6 100644 --- a/pkgs/development/python-modules/monai/default.nix +++ b/pkgs/development/python-modules/monai/default.nix @@ -6,7 +6,7 @@ , ignite , numpy , pybind11 -, pytorch +, torch , which }: @@ -33,7 +33,7 @@ buildPythonPackage rec { nativeBuildInputs = [ ninja which ]; buildInputs = [ pybind11 ]; - propagatedBuildInputs = [ numpy pytorch ignite ]; + propagatedBuildInputs = [ numpy torch ignite ]; BUILD_MONAI = 1; diff --git a/pkgs/development/python-modules/py-deprecate/default.nix b/pkgs/development/python-modules/py-deprecate/default.nix index ff921789bbfd5..86064dd0933f5 100644 --- a/pkgs/development/python-modules/py-deprecate/default.nix +++ b/pkgs/development/python-modules/py-deprecate/default.nix @@ -3,7 +3,6 @@ , fetchFromGitHub , pytestCheckHook , scikit-learn -, pytorch }: let diff --git a/pkgs/development/python-modules/pymanopt/default.nix b/pkgs/development/python-modules/pymanopt/default.nix index f04357596852c..cc6cef776691e 100644 --- a/pkgs/development/python-modules/pymanopt/default.nix +++ b/pkgs/development/python-modules/pymanopt/default.nix @@ -3,7 +3,7 @@ , buildPythonPackage , numpy , scipy -, pytorch +, torch , autograd , nose2 , matplotlib @@ -21,7 +21,7 @@ buildPythonPackage rec { sha256 = "sha256-dqyduExNgXIbEFlgkckaPfhLFSVLqPgwAOyBUdowwiQ="; }; - propagatedBuildInputs = [ numpy scipy pytorch ]; + propagatedBuildInputs = [ numpy scipy torch ]; checkInputs = [ nose2 autograd matplotlib tensorflow ]; checkPhase = '' diff --git a/pkgs/development/python-modules/pyro-ppl/default.nix b/pkgs/development/python-modules/pyro-ppl/default.nix index 7bc6ac00925df..b14119c328077 100644 --- a/pkgs/development/python-modules/pyro-ppl/default.nix +++ b/pkgs/development/python-modules/pyro-ppl/default.nix @@ -10,7 +10,7 @@ , pillow , pyro-api , pythonOlder -, pytorch +, torch , scikit-learn , seaborn , torchvision @@ -32,7 +32,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ pyro-api - pytorch + torch networkx opt-einsum tqdm diff --git a/pkgs/development/python-modules/pytorch-lightning/default.nix b/pkgs/development/python-modules/pytorch-lightning/default.nix index b775f13fdacd8..a2d8da399d28c 100644 --- a/pkgs/development/python-modules/pytorch-lightning/default.nix +++ b/pkgs/development/python-modules/pytorch-lightning/default.nix @@ -6,7 +6,7 @@ , fsspec , packaging , pytestCheckHook -, pytorch +, torch , pyyaml , tensorboard , torchmetrics @@ -29,7 +29,7 @@ buildPythonPackage rec { packaging future fsspec - pytorch + torch pyyaml tensorboard torchmetrics diff --git a/pkgs/development/python-modules/pytorch-metric-learning/default.nix b/pkgs/development/python-modules/pytorch-metric-learning/default.nix index 1c6b2d61ecb6e..27b97af42b05b 100644 --- a/pkgs/development/python-modules/pytorch-metric-learning/default.nix +++ b/pkgs/development/python-modules/pytorch-metric-learning/default.nix @@ -5,7 +5,7 @@ , numpy , scikit-learn , pytestCheckHook -, pytorch +, torch , torchvision , tqdm , faiss @@ -26,7 +26,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy - pytorch + torch scikit-learn torchvision tqdm diff --git a/pkgs/development/python-modules/pytorch-pfn-extras/default.nix b/pkgs/development/python-modules/pytorch-pfn-extras/default.nix index bb4765aa2acad..639c13508c57d 100644 --- a/pkgs/development/python-modules/pytorch-pfn-extras/default.nix +++ b/pkgs/development/python-modules/pytorch-pfn-extras/default.nix @@ -5,7 +5,7 @@ , onnx , packaging , pytestCheckHook -, pytorch +, torch , torchvision , typing-extensions }: @@ -21,7 +21,7 @@ buildPythonPackage rec { sha256 = "sha256-w4WSEgNLdVLDnKS4kzJBK9BkrrGzbk2aCIhk4HCM/Bk="; }; - propagatedBuildInputs = [ numpy packaging pytorch typing-extensions ]; + propagatedBuildInputs = [ numpy packaging torch typing-extensions ]; checkInputs = [ onnx pytestCheckHook torchvision ]; diff --git a/pkgs/development/python-modules/pywick/default.nix b/pkgs/development/python-modules/pywick/default.nix index 0db11576203a5..6cbb64845dbb8 100644 --- a/pkgs/development/python-modules/pywick/default.nix +++ b/pkgs/development/python-modules/pywick/default.nix @@ -8,7 +8,7 @@ , pandas , pillow , six -, pytorch +, torch , torchvision , tqdm , lib @@ -28,7 +28,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - h5py hickle numpy pandas pillow six pytorch torchvision tqdm + h5py hickle numpy pandas pillow six torch torchvision tqdm ]; checkInputs = [ pytest ]; diff --git a/pkgs/development/python-modules/qiskit-machine-learning/default.nix b/pkgs/development/python-modules/qiskit-machine-learning/default.nix index c74e6c53bdea4..ea4ae3bb3438d 100644 --- a/pkgs/development/python-modules/qiskit-machine-learning/default.nix +++ b/pkgs/development/python-modules/qiskit-machine-learning/default.nix @@ -13,7 +13,7 @@ , sparse # Optional inputs , withTorch ? true -, pytorch +, torch # Check Inputs , pytestCheckHook , ddt @@ -41,7 +41,7 @@ buildPythonPackage rec { 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 = [ diff --git a/pkgs/development/python-modules/rising/default.nix b/pkgs/development/python-modules/rising/default.nix index b68fedbcfc0f9..07fdad78aadfb 100644 --- a/pkgs/development/python-modules/rising/default.nix +++ b/pkgs/development/python-modules/rising/default.nix @@ -6,7 +6,7 @@ , pytest-cov , dill , numpy -, pytorch +, torch , threadpoolctl , tqdm }: @@ -24,7 +24,7 @@ buildPythonPackage rec { sha256 = "15wYWToXRae1cMpHWbJwzAp0THx6ED9ixQgL+n1v9PI="; }; - propagatedBuildInputs = [ numpy pytorch threadpoolctl tqdm ]; + propagatedBuildInputs = [ numpy torch threadpoolctl tqdm ]; checkInputs = [ dill pytest-cov pytestCheckHook ]; disabledTests = [ "test_affine" ]; # deprecated division operator '/' diff --git a/pkgs/development/python-modules/skorch/default.nix b/pkgs/development/python-modules/skorch/default.nix index 0b2056979e41c..a6508ded491e0 100644 --- a/pkgs/development/python-modules/skorch/default.nix +++ b/pkgs/development/python-modules/skorch/default.nix @@ -7,7 +7,7 @@ , flaky , numpy , pandas -, pytorch +, torch , scikit-learn , scipy , tabulate @@ -23,7 +23,7 @@ buildPythonPackage rec { 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 = [ diff --git a/pkgs/development/python-modules/slicer/default.nix b/pkgs/development/python-modules/slicer/default.nix index 2033c94fefc1a..f5352c3de9334 100644 --- a/pkgs/development/python-modules/slicer/default.nix +++ b/pkgs/development/python-modules/slicer/default.nix @@ -4,7 +4,7 @@ , isPy27 , pytestCheckHook , pandas -, pytorch +, torch , scipy }: @@ -18,7 +18,7 @@ buildPythonPackage rec { sha256 = "f5d5f7b45f98d155b9c0ba6554fa9770c6b26d5793a3e77a1030fb56910ebeec"; }; - checkInputs = [ pytestCheckHook pandas pytorch scipy ]; + checkInputs = [ pytestCheckHook pandas torch scipy ]; disabledTests = [ # IndexError: too many indices for array diff --git a/pkgs/development/python-modules/spacy-transformers/default.nix b/pkgs/development/python-modules/spacy-transformers/default.nix index 93bd22f1f6506..d21f5d17cd275 100644 --- a/pkgs/development/python-modules/spacy-transformers/default.nix +++ b/pkgs/development/python-modules/spacy-transformers/default.nix @@ -3,7 +3,7 @@ , fetchPypi , buildPythonPackage , dataclasses -, pytorch +, torch , pythonOlder , spacy , spacy-alignments @@ -24,7 +24,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - pytorch + torch spacy spacy-alignments srsly diff --git a/pkgs/development/python-modules/stanza/default.nix b/pkgs/development/python-modules/stanza/default.nix index 808f90f224503..d9e44eea1168c 100644 --- a/pkgs/development/python-modules/stanza/default.nix +++ b/pkgs/development/python-modules/stanza/default.nix @@ -7,7 +7,7 @@ , protobuf , requests , six -, pytorch +, torch , tqdm }: @@ -30,7 +30,7 @@ buildPythonPackage rec { protobuf requests six - pytorch + torch tqdm ]; diff --git a/pkgs/development/python-modules/tensorboardx/default.nix b/pkgs/development/python-modules/tensorboardx/default.nix index 93d94d0c38266..4bc85a5cd08e0 100644 --- a/pkgs/development/python-modules/tensorboardx/default.nix +++ b/pkgs/development/python-modules/tensorboardx/default.nix @@ -10,7 +10,7 @@ , pillow , protobuf3_8 , pytestCheckHook -, pytorch +, torch , six , soundfile , tensorboard @@ -55,7 +55,7 @@ buildPythonPackage rec { moto pillow pytestCheckHook - pytorch + torch tensorboard torchvision ]; diff --git a/pkgs/development/python-modules/test-tube/default.nix b/pkgs/development/python-modules/test-tube/default.nix index 5eac0d60b6cff..d480600b253db 100644 --- a/pkgs/development/python-modules/test-tube/default.nix +++ b/pkgs/development/python-modules/test-tube/default.nix @@ -7,7 +7,7 @@ , imageio , numpy , pandas -, pytorch +, torch , tensorboard }: @@ -33,7 +33,7 @@ buildPythonPackage rec { imageio numpy pandas - pytorch + torch tensorboard ]; diff --git a/pkgs/development/python-modules/torch-tb-profiler/default.nix b/pkgs/development/python-modules/torch-tb-profiler/default.nix index 2843910613672..41ff63a21fad7 100644 --- a/pkgs/development/python-modules/torch-tb-profiler/default.nix +++ b/pkgs/development/python-modules/torch-tb-profiler/default.nix @@ -3,7 +3,7 @@ , lib , pandas , pytestCheckHook -, pytorch +, torch , tensorboard , torchvision }: @@ -27,7 +27,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ pandas tensorboard ]; - checkInputs = [ pytestCheckHook pytorch torchvision ]; + checkInputs = [ pytestCheckHook torch torchvision ]; disabledTests = [ # Tests that attempt to access the filesystem in naughty ways. diff --git a/pkgs/development/python-modules/pytorch/bin.nix b/pkgs/development/python-modules/torch/bin.nix similarity index 96% rename from pkgs/development/python-modules/pytorch/bin.nix rename to pkgs/development/python-modules/torch/bin.nix index e2427ac22df3a..5badb88d3750c 100644 --- a/pkgs/development/python-modules/pytorch/bin.nix +++ b/pkgs/development/python-modules/torch/bin.nix @@ -24,8 +24,8 @@ let 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"; diff --git a/pkgs/development/python-modules/pytorch/binary-hashes.nix b/pkgs/development/python-modules/torch/binary-hashes.nix similarity index 98% rename from pkgs/development/python-modules/pytorch/binary-hashes.nix rename to pkgs/development/python-modules/torch/binary-hashes.nix index 945af484a4af9..fccc7ce642e77 100644 --- a/pkgs/development/python-modules/pytorch/binary-hashes.nix +++ b/pkgs/development/python-modules/torch/binary-hashes.nix @@ -1,4 +1,4 @@ -# 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 diff --git a/pkgs/development/python-modules/pytorch/breakpad-sigstksz.patch b/pkgs/development/python-modules/torch/breakpad-sigstksz.patch similarity index 100% rename from pkgs/development/python-modules/pytorch/breakpad-sigstksz.patch rename to pkgs/development/python-modules/torch/breakpad-sigstksz.patch diff --git a/pkgs/development/python-modules/pytorch/default.nix b/pkgs/development/python-modules/torch/default.nix similarity index 99% rename from pkgs/development/python-modules/pytorch/default.nix rename to pkgs/development/python-modules/torch/default.nix index 76a835910392d..9d4c64861a3fb 100644 --- a/pkgs/development/python-modules/pytorch/default.nix +++ b/pkgs/development/python-modules/torch/default.nix @@ -120,8 +120,8 @@ let "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"; diff --git a/pkgs/development/python-modules/pytorch/prefetch.sh b/pkgs/development/python-modules/torch/prefetch.sh similarity index 100% rename from pkgs/development/python-modules/pytorch/prefetch.sh rename to pkgs/development/python-modules/torch/prefetch.sh diff --git a/pkgs/development/python-modules/pytorch/pthreadpool-disable-gcd.diff b/pkgs/development/python-modules/torch/pthreadpool-disable-gcd.diff similarity index 100% rename from pkgs/development/python-modules/pytorch/pthreadpool-disable-gcd.diff rename to pkgs/development/python-modules/torch/pthreadpool-disable-gcd.diff diff --git a/pkgs/development/python-modules/torchaudio/bin.nix b/pkgs/development/python-modules/torchaudio/bin.nix index 42558837bc000..aabec0a8d4970 100644 --- a/pkgs/development/python-modules/torchaudio/bin.nix +++ b/pkgs/development/python-modules/torchaudio/bin.nix @@ -7,7 +7,7 @@ , isPy39 , isPy310 , python -, pytorch-bin +, torch-bin , pythonOlder , pythonAtLeast }: @@ -26,7 +26,7 @@ buildPythonPackage rec { 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.`. @@ -38,7 +38,7 @@ buildPythonPackage rec { # 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" ''; diff --git a/pkgs/development/python-modules/torchaudio/binary-hashes.nix b/pkgs/development/python-modules/torchaudio/binary-hashes.nix index 70ae3357221f6..2cd39f3a9142e 100644 --- a/pkgs/development/python-modules/torchaudio/binary-hashes.nix +++ b/pkgs/development/python-modules/torchaudio/binary-hashes.nix @@ -1,4 +1,4 @@ -# 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 diff --git a/pkgs/development/python-modules/torchgpipe/default.nix b/pkgs/development/python-modules/torchgpipe/default.nix index 2c289f8526990..68e113ce70fee 100644 --- a/pkgs/development/python-modules/torchgpipe/default.nix +++ b/pkgs/development/python-modules/torchgpipe/default.nix @@ -4,7 +4,7 @@ , isPy27 , pytest-runner , pytestCheckHook -, pytorch +, torch }: buildPythonPackage rec { @@ -20,7 +20,7 @@ buildPythonPackage rec { sha256 = "0ki0njhmz1i3pkpr3y6h6ac7p5qh1kih06mknc2s18mfw34f2l55"; }; - propagatedBuildInputs = [ pytorch ]; + propagatedBuildInputs = [ torch ]; checkInputs = [ pytest-runner pytestCheckHook ]; disabledTests = [ diff --git a/pkgs/development/python-modules/torchinfo/default.nix b/pkgs/development/python-modules/torchinfo/default.nix index 66bdb587bc218..c18f1c68be989 100644 --- a/pkgs/development/python-modules/torchinfo/default.nix +++ b/pkgs/development/python-modules/torchinfo/default.nix @@ -3,7 +3,7 @@ , fetchFromGitHub , pytestCheckHook , pythonOlder -, pytorch +, torch , torchvision }: @@ -22,7 +22,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - pytorch + torch torchvision ]; diff --git a/pkgs/development/python-modules/torchmetrics/default.nix b/pkgs/development/python-modules/torchmetrics/default.nix index e71e623e428b7..933566fcb3936 100644 --- a/pkgs/development/python-modules/torchmetrics/default.nix +++ b/pkgs/development/python-modules/torchmetrics/default.nix @@ -7,7 +7,7 @@ , packaging , psutil , py-deprecate -, pytorch +, torch , pytestCheckHook , torchmetrics , pytorch-lightning @@ -34,7 +34,7 @@ buildPythonPackage { # Let the user bring their own instance buildInputs = [ - pytorch + torch ]; checkInputs = [ diff --git a/pkgs/development/python-modules/torchvision/bin.nix b/pkgs/development/python-modules/torchvision/bin.nix index 60a33882021b2..2abf60009f9e4 100644 --- a/pkgs/development/python-modules/torchvision/bin.nix +++ b/pkgs/development/python-modules/torchvision/bin.nix @@ -9,7 +9,7 @@ , patchelf , pillow , python -, pytorch-bin +, torch-bin }: let @@ -34,7 +34,7 @@ in buildPythonPackage { 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.`. @@ -48,7 +48,7 @@ in buildPythonPackage { # 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" ''; diff --git a/pkgs/development/python-modules/torchvision/binary-hashes.nix b/pkgs/development/python-modules/torchvision/binary-hashes.nix index 271968391ef0c..4dbeb8d181503 100644 --- a/pkgs/development/python-modules/torchvision/binary-hashes.nix +++ b/pkgs/development/python-modules/torchvision/binary-hashes.nix @@ -1,4 +1,4 @@ -# 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 diff --git a/pkgs/development/python-modules/torchvision/default.nix b/pkgs/development/python-modules/torchvision/default.nix index 4eb0368a821e4..594aee03431ee 100644 --- a/pkgs/development/python-modules/torchvision/default.nix +++ b/pkgs/development/python-modules/torchvision/default.nix @@ -9,19 +9,19 @@ , 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"; @@ -42,7 +42,7 @@ in buildPythonPackage rec { 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}" diff --git a/pkgs/development/python-modules/transformers/default.nix b/pkgs/development/python-modules/transformers/default.nix index 97132a964559e..864245622c711 100644 --- a/pkgs/development/python-modules/transformers/default.nix +++ b/pkgs/development/python-modules/transformers/default.nix @@ -17,7 +17,7 @@ , scikit-learn , pillow , pyyaml -, pytorch +, torch , tokenizers , tqdm }: @@ -67,7 +67,7 @@ buildPythonPackage rec { # tf2onnx ]; torch = [ - pytorch + torch ]; tokenizers = [ tokenizers diff --git a/pkgs/development/python-modules/wandb/default.nix b/pkgs/development/python-modules/wandb/default.nix index fc6dbadaecb6b..a466c9919f430 100644 --- a/pkgs/development/python-modules/wandb/default.nix +++ b/pkgs/development/python-modules/wandb/default.nix @@ -25,7 +25,7 @@ , pytestCheckHook , python-dateutil , pythonOlder -, pytorch +, torch , pyyaml , requests , scikit-learn @@ -94,7 +94,7 @@ buildPythonPackage rec { pytest-mock pytest-xdist pytestCheckHook - pytorch + torch scikit-learn tqdm ]; diff --git a/pkgs/tools/audio/tts/default.nix b/pkgs/tools/audio/tts/default.nix index 6291c45f839ee..5ba8c3bf29c74 100644 --- a/pkgs/tools/audio/tts/default.nix +++ b/pkgs/tools/audio/tts/default.nix @@ -84,11 +84,11 @@ python.pkgs.buildPythonApplication rec { pandas pypinyin pysbd - pytorch-bin pyworld scipy soundfile tensorflow + torch-bin torchaudio-bin tqdm umap-learn diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index a4302879c4158..9f69a906b967f 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1232,7 +1232,7 @@ let 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 { }; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 501c2acf079a6..6f9f6accd9276 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -158,6 +158,10 @@ mapAliases ({ 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"; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 18e6e78450a55..9a7005a46b09c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9043,28 +9043,12 @@ in { 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 { }; pytradfri = callPackage ../development/python-modules/pytradfri { }; @@ -10931,6 +10915,23 @@ in { 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 { }; torchaudio-bin = callPackage ../development/python-modules/torchaudio/bin.nix { }; diff --git a/pkgs/top-level/release-cuda.nix b/pkgs/top-level/release-cuda.nix index 6cc149936ac8e..c96f08af41bf9 100644 --- a/pkgs/top-level/release-cuda.nix +++ b/pkgs/top-level/release-cuda.nix @@ -48,7 +48,7 @@ let 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));