Commit Graph

38 Commits

Author SHA1 Message Date
Matthew Bauer
c85fc341b0 pytorch: update to use passthru's for checks
This makes the checks a little easier to understand - we can just
check it in the passthru. Also increase major check for cuda 11.
2020-09-10 14:23:15 -05:00
Daniël de Kok
33b21aec60 pytorch-bin: init at 1.6.0 2020-08-30 11:12:16 -07:00
Daniël de Kok
a4ed797948 python3Packages.pytorch: remove oneDNN dependency
oneDNN was added as a dependency, but it is not actually used by
PyTorch. PyTorch uses oneDNN from the vendored iDeep dependency.

Using a system-provided oneDNN is currently not a supported build
option.
2020-08-26 10:55:52 +02:00
Daniël de Kok
bc7b404b1a python3Packages.pytorch: fix library names in lib output on Darwin
The library name fixup was attempted on the dev output, whereas it should be
applied to the lib output.
2020-08-08 10:36:48 +02:00
Daniël de Kok
6ffc0fd601 python3Packages.pytorch: fix Darwin build by disabling GCD
PyTorch 1.6.0 has updated the vendored pthreadpool library, which has recently
added support for Grand Central Dispatch. Unfortunately, it uses functionality
(DISPATCH_APPLY_AUTO) that is only available since macOS 10.13, whereas we are
still using 10.12 libraries.

We can't directly pass through option to vendored libraries, since the setup.py
scripts creates/filters the options that are passed to CMake. So, instead, this
adds a small patch that disables the GCD functionality in pthreadpool.
2020-08-08 10:36:48 +02:00
Daniël de Kok
c67ba72dd8 python3Packages.pytorch: 1.5.1 -> 1.6.0
Changelog:
https://github.com/pytorch/pytorch/releases/tag/v1.6.0
2020-07-31 10:58:45 -07:00
Daniël de Kok
2611e96bf3 python3Packages.pytorch: create separate lib output
At some point pytorch.dev was added to expose the libtorch headers and
libraries to non-Python users of libtorch. However, this output
currently has two disadvantages:

1. An application that compiles against the dev output will also have
   the libtorch header files in its closure. This is not so nice when
   e.g. building Docker images of applications that use libtorch.
2. The dev output has a large transitive closure with many dependencies
   that are not necessary when compiling against libtorch.

This change adds the `lib` output so that applications that only link
against libtorch libraries have a small closure.

Before this change, the libtorch dependency adds 746MiB:

% nix path-info -S `realpath result-dev`
/nix/store/10rmy81bjk628sfpbj2szxlws6brq1xn-python3.8-pytorch-1.5.1-dev   782203848

With this change it is reduced to 196MiB:

% nix path-info -S `realpath result-lib`
/nix/store/bck65lf0z7gdhcf89w1zs5nz333lhgwa-python3.8-pytorch-1.5.1-lib   205865056
2020-07-12 08:34:19 +02:00
Daniël de Kok
5c80cdeb1a python3Packages.pytorch: fix AArch64 build
aarch64-linux builds fail because of the use of opcodes in QNNPACK
that the GNU assembpler does not support. This change cherry-picks an
upstream patch that fixes this. See:

https://github.com/pytorch/pytorch/issues/33124
https://github.com/pytorch/pytorch/pull/40584
2020-06-30 09:25:45 +02:00
Daniël de Kok
d144f2dfda python3Packages.pytorch: 1.5.0 -> 1.5.1
Changelog:

https://github.com/pytorch/pytorch/tree/v1.5.1
2020-06-30 08:01:39 +02:00
Guillaume Desforges
0574ace715 pythonPackages.pytorch: 1.4.1 -> 1.5.0
Fixes previous bugs that required a patch
Fixes CUDA build, see https://github.com/NixOS/nixpkgs/issues/89403
2020-06-08 11:39:23 -07:00
Benjamin Hipple
ecef2975e3 python3Packages.pytorch: reference dnnl by new name oneDNN 2020-05-09 14:46:40 -04:00
Benjamin Hipple
fb5bb25c10 python3Packages.pytorch: fixup builds with MKL
- Pass `blas.provider` into `buildInputs`, so that CMake can find the actual
  `mkl` for inspection of its cmake files and headers.

- Add `USE_MKL` correctly when the blas provider is `mkl`.

- Use the MKLDNN and MKLDNN_CBLAS flags by default, since `mkldnn` is FOSS and
  always available..

- Remove a patch for MKL 2019, since we've moved to 2020.

- Add a pythonImportsCheck for "torch" as a basic sanity-check

- Removed some unused variables at the top of the file
2020-05-09 13:30:54 -04:00
Sam Stites
cc245fdcd5 pytorch: 1.2.0 -> 1.4.1
Co-authored-by: Benjamin Hipple <bhipple@protonmail.com>
2020-05-09 13:30:54 -04:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Anders Kaseorg
3cd8ce3bce treewide: Fix unsafe concatenation of $LD_LIBRARY_PATH
Naive concatenation of $LD_LIBRARY_PATH can result in an empty
colon-delimited segment; this tells glibc to load libraries from the
current directory, which is definitely wrong, and may be a security
vulnerability if the current directory is untrusted.  (See #67234, for
example.)  Fix this throughout the tree.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2020-01-15 09:47:03 +01:00
Sam Stites
dfa8e8b9bc python3Packages.pytorch: 1.0.0 -> 1.2.0 2019-10-23 10:57:43 -07:00
Linus Heckemann
5aa4b19946 treewide: mark some broken packages as broken
Refs:
e6754980264fe927320d5ff2dbd24ca4fac9a160
1e9cc5b9844ef603fe160e9f671178f96200774f
793a2fe1e8bb886ca2096c5904e1193dc3268b6d
c19cf65261639f749012454932a532aa7c681e4b
f6544d618f30fae0bc4798c4387a8c7c9c047a7c
2019-10-08 17:14:26 +02:00
Jonathan Ringer
02648a6cc1 python3Packages.pytorch: fix build 2019-09-29 11:18:58 +02:00
Anders Kaseorg
27d13628ee pytorch: Move cudatoolkit to nativeBuildInputs
nvcc must be available in PATH at build time; otherwise CUDA support
will be disabled.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-04-27 07:49:42 +02:00
Tom Hunger
488230c253 pytorch: Use nativeBuildInputs to specify binary build dependencies. 2019-03-07 09:41:43 +01:00
Austin Seipp
af53114a09 pythonPackages.pytorch: fix Intel MKL BLAS compile failure
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-12-25 10:49:40 -06:00
Austin Seipp
60176e005d pythonPackages.pytorch: add libnuma dep on Linux
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-12-25 10:49:40 -06:00
Austin Seipp
79d21285dd pythonPackages.pytorch: meta touch up, add myself as maintainer
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-12-25 10:49:39 -06:00
Austin Seipp
6fcebb6427 pythonPackages.pytorch: fix spurious test failures
This was fixed upstream already -- these tests ensure multi-GPU
functionality works, and thus requires multiple GPUs.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-12-25 10:49:39 -06:00
Austin Seipp
c6ecb3887f pythonPackages.pytorch: fix weirdly broken wheel version number
Otherwise, the wheel gets built with invalid metadata -- causing
'torch >= 1.0.0' to be unsatisfiable in other python packages, for
instance.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-12-25 10:49:39 -06:00
Kai Wohlfahrt
be96560327 pythonPackages.pytorch: 0.4.1 -> 1.0.0
`thd_distributed` is broken just like `distributed` is. `cpp_extensions`
is broken upstream now, it seems? In the future it can hopefully be
re-enabled.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-12-25 10:49:39 -06:00
Kai Wohlfahrt
4d8cf0b84e pytorch: disable distributed tests
These fail with sandboxing
2018-11-07 17:09:54 +00:00
Dmitry Vyal
f7f8b60ace pytorch-0.4 rpath fix, some tests reenabled 2018-09-23 09:36:32 +02:00
teh
8c3514609b pytorch: 0.4.0 -> 0.4.1 (#45773)
Also disable tests that fail in sandbox.
2018-08-30 17:30:29 +02:00
volth
52f53c69ce pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
Vladimír Čunát
2059bf9e39
Merge older staging with added firefox-related updates 2018-06-29 21:06:39 +02:00
Ryan Mulligan
fce8f26af6 treewide: http -> https (#42665) 2018-06-27 22:12:57 +02:00
Frederik Rietdijk
ced21f5e1a pythonPackages: remove name attribute`
The `buildPython*` function computes name from `pname` and `version`.
This change removes `name` attribute from all expressions in
`pkgs/development/python-modules`.

While at it, some other minor changes were made as well, such as
replacing `fetchurl` calls with `fetchPypi`.
2018-06-23 18:14:26 +02:00
Anders Kaseorg
d2f7acf30c pytorch: 0.3.1 -> 0.4.0
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-05-13 14:02:08 -04:00
Anders Kaseorg
ce00943916 pytorch: 0.2.0 → 0.3.1 with CUDA and cuDNN (#38530)
* pytorch-0.3 with optional cuda and cudnn

* pytorch tests reenabled if compiling without cuda

* pytorch: Conditionalize cudnn dependency on cudaSupport

Signed-off-by: Anders Kaseorg <andersk@mit.edu>

* pytorch: Compile with the same GCC version used by CUDA if cudaSupport

Fixes this error:

In file included from /nix/store/gv7w3c71jg627cpcff04yi6kwzpzjyap-cudatoolkit-9.1.85.1/include/host_config.h:50:0,
                 from /nix/store/gv7w3c71jg627cpcff04yi6kwzpzjyap-cudatoolkit-9.1.85.1/include/cuda_runtime.h:78,
                 from <command-line>:0:
/nix/store/gv7w3c71jg627cpcff04yi6kwzpzjyap-cudatoolkit-9.1.85.1/include/crt/host_config.h:121:2: error: #error -- unsupported GNU version! gcc versions later than 6 are not supported!
 #error -- unsupported GNU version! gcc versions later than 6 are not supported!
  ^~~~~

Signed-off-by: Anders Kaseorg <andersk@mit.edu>

* pytorch: Build with joined cudatoolkit

Similar to #30058 for TensorFlow.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>

* pytorch: 0.3.0 -> 0.3.1

Signed-off-by: Anders Kaseorg <andersk@mit.edu>

* pytorch: Patch for “refcounted file mapping not supported” failure

Signed-off-by: Anders Kaseorg <andersk@mit.edu>

* pytorch: Skip distributed tests

Signed-off-by: Anders Kaseorg <andersk@mit.edu>

* pytorch: Use the stub libcuda.so from cudatoolkit for running tests

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-05-04 16:19:31 +02:00
Ismaïl Senhaji
98c84e42d4 pytorch: fix sha256 hash 2017-11-22 23:11:52 +01:00
Eric Sagnes
dd809b930e pytorch: 0.1.12 -> 0.2.0 2017-08-19 10:22:23 +09:00
Tom Hunger
567b84dd50 python.pkgs.pytorch: init at 0.1.12 2017-07-17 14:08:15 +02:00