2020-05-03 01:40:27 +01:00
|
|
|
|
{ stdenv, lib, fetchFromGitHub, fetchpatch, buildPythonPackage, python,
|
2021-03-09 08:51:00 +00:00
|
|
|
|
cudaSupport ? false, cudatoolkit, cudnn, nccl, magma,
|
2019-12-17 17:55:43 +00:00
|
|
|
|
mklDnnSupport ? true, useSystemNccl ? true,
|
2021-01-10 12:40:19 +00:00
|
|
|
|
MPISupport ? false, mpi,
|
2019-12-17 17:55:43 +00:00
|
|
|
|
buildDocs ? false,
|
2019-10-20 22:07:04 +01:00
|
|
|
|
cudaArchList ? null,
|
2020-10-28 10:58:55 +00:00
|
|
|
|
|
|
|
|
|
# Native build inputs
|
2020-11-24 15:29:28 +00:00
|
|
|
|
cmake, util-linux, linkFarm, symlinkJoin, which,
|
2020-10-28 10:58:55 +00:00
|
|
|
|
|
|
|
|
|
# Build inputs
|
|
|
|
|
numactl,
|
|
|
|
|
|
|
|
|
|
# Propagated build inputs
|
|
|
|
|
dataclasses, numpy, pyyaml, cffi, click, typing-extensions,
|
|
|
|
|
|
|
|
|
|
# Unit tests
|
|
|
|
|
hypothesis, psutil,
|
2019-10-20 22:07:04 +01:00
|
|
|
|
|
2019-12-17 17:55:43 +00:00
|
|
|
|
# virtual pkg that consistently instantiates blas across nixpkgs
|
|
|
|
|
# See https://github.com/NixOS/nixpkgs/pull/83888
|
|
|
|
|
blas,
|
|
|
|
|
|
2019-10-20 22:07:04 +01:00
|
|
|
|
# ninja (https://ninja-build.org) must be available to run C++ extensions tests,
|
|
|
|
|
ninja,
|
|
|
|
|
|
|
|
|
|
# dependencies for torch.utils.tensorboard
|
2019-12-17 17:55:43 +00:00
|
|
|
|
pillow, six, future, tensorflow-tensorboard, protobuf,
|
2019-10-20 22:07:04 +01:00
|
|
|
|
|
2020-10-28 10:58:55 +00:00
|
|
|
|
isPy3k, pythonOlder }:
|
2017-07-16 20:15:05 +01:00
|
|
|
|
|
2019-10-20 22:07:04 +01:00
|
|
|
|
# assert that everything needed for cuda is present and that the correct cuda versions are used
|
|
|
|
|
assert !cudaSupport || (let majorIs = lib.versions.major cudatoolkit.version;
|
2020-09-10 20:23:15 +01:00
|
|
|
|
in majorIs == "9" || majorIs == "10" || majorIs == "11");
|
2019-10-20 22:07:04 +01:00
|
|
|
|
|
|
|
|
|
# confirm that cudatoolkits are sync'd across dependencies
|
2021-01-10 12:40:19 +00:00
|
|
|
|
assert !(MPISupport && cudaSupport) || mpi.cudatoolkit == cudatoolkit;
|
2020-09-10 20:23:15 +01:00
|
|
|
|
assert !cudaSupport || magma.cudatoolkit == cudatoolkit;
|
2019-10-20 22:07:04 +01:00
|
|
|
|
|
2018-05-04 15:19:31 +01:00
|
|
|
|
let
|
2021-04-10 07:08:08 +01:00
|
|
|
|
setBool = v: if v then "1" else "0";
|
2018-05-04 15:19:31 +01:00
|
|
|
|
cudatoolkit_joined = symlinkJoin {
|
|
|
|
|
name = "${cudatoolkit.name}-unsplit";
|
2019-10-20 22:07:04 +01:00
|
|
|
|
# nccl is here purely for semantic grouping it could be moved to nativeBuildInputs
|
|
|
|
|
paths = [ cudatoolkit.out cudatoolkit.lib nccl.dev nccl.out ];
|
2018-05-04 15:19:31 +01:00
|
|
|
|
};
|
|
|
|
|
|
2019-10-20 22:07:04 +01:00
|
|
|
|
# Give an explicit list of supported architectures for the build, See:
|
|
|
|
|
# - pytorch bug report: https://github.com/pytorch/pytorch/issues/23573
|
|
|
|
|
# - pytorch-1.2.0 build on nixpks: https://github.com/NixOS/nixpkgs/pull/65041
|
|
|
|
|
#
|
|
|
|
|
# This list was selected by omitting the TORCH_CUDA_ARCH_LIST parameter,
|
|
|
|
|
# observing the fallback option (which selected all architectures known
|
|
|
|
|
# from cudatoolkit_10_0, pytorch-1.2, and python-3.6), and doing a binary
|
|
|
|
|
# searching to find offending architectures.
|
|
|
|
|
#
|
|
|
|
|
# NOTE: Because of sandboxing, this derivation can't auto-detect the hardware's
|
|
|
|
|
# cuda architecture, so there is also now a problem around new architectures
|
|
|
|
|
# not being supported until explicitly added to this derivation.
|
|
|
|
|
#
|
|
|
|
|
# FIXME: CMake is throwing the following warning on python-1.2:
|
|
|
|
|
#
|
|
|
|
|
# ```
|
|
|
|
|
# CMake Warning at cmake/public/utils.cmake:172 (message):
|
|
|
|
|
# In the future we will require one to explicitly pass TORCH_CUDA_ARCH_LIST
|
|
|
|
|
# to cmake instead of implicitly setting it as an env variable. This will
|
|
|
|
|
# become a FATAL_ERROR in future version of pytorch.
|
|
|
|
|
# ```
|
|
|
|
|
# If this is causing problems for your build, this derivation may have to strip
|
|
|
|
|
# away the standard `buildPythonPackage` and use the
|
|
|
|
|
# [*Adjust Build Options*](https://github.com/pytorch/pytorch/tree/v1.2.0#adjust-build-options-optional)
|
|
|
|
|
# instructions. This will also add more flexibility around configurations
|
|
|
|
|
# (allowing FBGEMM to be built in pytorch-1.1), and may future proof this
|
|
|
|
|
# derivation.
|
|
|
|
|
brokenArchs = [ "3.0" ]; # this variable is only used as documentation.
|
2021-02-14 07:18:02 +00:00
|
|
|
|
|
|
|
|
|
cudaCapabilities = rec {
|
|
|
|
|
cuda9 = [
|
|
|
|
|
"3.5"
|
|
|
|
|
"5.0"
|
|
|
|
|
"5.2"
|
|
|
|
|
"6.0"
|
|
|
|
|
"6.1"
|
|
|
|
|
"7.0"
|
|
|
|
|
"7.0+PTX" # I am getting a "undefined architecture compute_75" on cuda 9
|
|
|
|
|
# which leads me to believe this is the final cuda-9-compatible architecture.
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
cuda10 = cuda9 ++ [
|
|
|
|
|
"7.5"
|
|
|
|
|
"7.5+PTX" # < most recent architecture as of cudatoolkit_10_0 and pytorch-1.2.0
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
cuda11 = cuda10 ++ [
|
|
|
|
|
"8.0"
|
|
|
|
|
"8.0+PTX" # < CUDA toolkit 11.0
|
|
|
|
|
"8.6"
|
|
|
|
|
"8.6+PTX" # < CUDA toolkit 11.1
|
|
|
|
|
];
|
|
|
|
|
};
|
2019-10-20 22:07:04 +01:00
|
|
|
|
final_cudaArchList =
|
|
|
|
|
if !cudaSupport || cudaArchList != null
|
|
|
|
|
then cudaArchList
|
2021-02-14 07:18:02 +00:00
|
|
|
|
else cudaCapabilities."cuda${lib.versions.major cudatoolkit.version}";
|
2019-10-20 22:07:04 +01:00
|
|
|
|
|
2018-05-04 15:19:31 +01:00
|
|
|
|
# Normally libcuda.so.1 is provided at runtime by nvidia-x11 via
|
|
|
|
|
# LD_LIBRARY_PATH=/run/opengl-driver/lib. We only use the stub
|
|
|
|
|
# libcuda.so from cudatoolkit for running tests, so that we don’t have
|
|
|
|
|
# to recompile pytorch on every update to nvidia-x11 or the kernel.
|
|
|
|
|
cudaStub = linkFarm "cuda-stub" [{
|
|
|
|
|
name = "libcuda.so.1";
|
|
|
|
|
path = "${cudatoolkit}/lib/stubs/libcuda.so";
|
|
|
|
|
}];
|
|
|
|
|
cudaStubEnv = lib.optionalString cudaSupport
|
2020-01-02 00:29:34 +00:00
|
|
|
|
"LD_LIBRARY_PATH=${cudaStub}\${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH ";
|
2018-05-04 15:19:31 +01:00
|
|
|
|
|
|
|
|
|
in buildPythonPackage rec {
|
2017-07-16 20:15:05 +01:00
|
|
|
|
pname = "pytorch";
|
2020-08-30 10:34:32 +01:00
|
|
|
|
# Don't forget to update pytorch-bin to the same version.
|
2021-03-25 16:57:11 +00:00
|
|
|
|
version = "1.8.1";
|
2020-08-30 10:34:32 +01:00
|
|
|
|
|
2019-10-07 16:20:23 +01:00
|
|
|
|
disabled = !isPy3k;
|
2017-07-16 20:15:05 +01:00
|
|
|
|
|
2019-10-20 22:07:04 +01:00
|
|
|
|
outputs = [
|
|
|
|
|
"out" # output standard python package
|
2020-07-07 14:15:46 +01:00
|
|
|
|
"dev" # output libtorch headers
|
|
|
|
|
"lib" # output libtorch libraries
|
2019-10-20 22:07:04 +01:00
|
|
|
|
];
|
|
|
|
|
|
2017-07-16 20:15:05 +01:00
|
|
|
|
src = fetchFromGitHub {
|
2017-08-19 02:22:23 +01:00
|
|
|
|
owner = "pytorch";
|
|
|
|
|
repo = "pytorch";
|
|
|
|
|
rev = "v${version}";
|
2018-05-04 15:19:31 +01:00
|
|
|
|
fetchSubmodules = true;
|
2021-03-25 16:57:11 +00:00
|
|
|
|
sha256 = "sha256-HERbvmrfhWwH164GFHU/M0KbhVAuhI5sBZSxCZy8mRk=";
|
2017-07-16 20:15:05 +01:00
|
|
|
|
};
|
|
|
|
|
|
2020-10-28 10:58:55 +00:00
|
|
|
|
patches = lib.optionals stdenv.isDarwin [
|
2020-08-05 19:51:05 +01:00
|
|
|
|
# pthreadpool added support for Grand Central Dispatch in April
|
|
|
|
|
# 2020. However, this relies on functionality (DISPATCH_APPLY_AUTO)
|
|
|
|
|
# that is available starting with macOS 10.13. However, our current
|
|
|
|
|
# base is 10.12. Until we upgrade, we can fall back on the older
|
|
|
|
|
# pthread support.
|
|
|
|
|
./pthreadpool-disable-gcd.diff
|
2020-06-30 06:56:38 +01:00
|
|
|
|
];
|
|
|
|
|
|
2020-10-28 10:58:55 +00:00
|
|
|
|
# The dataclasses module is included with Python >= 3.7. This should
|
|
|
|
|
# be fixed with the next PyTorch release.
|
|
|
|
|
postPatch = ''
|
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
|
--replace "'dataclasses'" "'dataclasses; python_version < \"3.7\"'"
|
|
|
|
|
'';
|
|
|
|
|
|
2018-05-04 15:19:31 +01:00
|
|
|
|
preConfigure = lib.optionalString cudaSupport ''
|
2019-10-20 22:07:04 +01:00
|
|
|
|
export TORCH_CUDA_ARCH_LIST="${lib.strings.concatStringsSep ";" final_cudaArchList}"
|
2018-05-04 23:00:50 +01:00
|
|
|
|
export CC=${cudatoolkit.cc}/bin/gcc CXX=${cudatoolkit.cc}/bin/g++
|
2018-05-04 15:19:31 +01:00
|
|
|
|
'' + lib.optionalString (cudaSupport && cudnn != null) ''
|
|
|
|
|
export CUDNN_INCLUDE_DIR=${cudnn}/include
|
2017-07-16 20:15:05 +01:00
|
|
|
|
'';
|
|
|
|
|
|
2019-12-17 17:55:43 +00:00
|
|
|
|
# Use pytorch's custom configurations
|
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
|
2021-04-10 07:08:08 +01:00
|
|
|
|
BUILD_NAMEDTENSOR = setBool true;
|
|
|
|
|
BUILD_DOCS = setBool buildDocs;
|
2020-05-03 01:40:27 +01:00
|
|
|
|
|
2021-04-10 07:09:38 +01:00
|
|
|
|
# We only do an imports check, so do not build tests either.
|
|
|
|
|
BUILD_TEST = setBool false;
|
2020-05-03 01:40:27 +01:00
|
|
|
|
|
2020-08-26 09:46:22 +01:00
|
|
|
|
# Unlike MKL, oneDNN (née MKLDNN) is FOSS, so we enable support for
|
|
|
|
|
# it by default. PyTorch currently uses its own vendored version
|
|
|
|
|
# of oneDNN through Intel iDeep.
|
2021-04-10 07:08:08 +01:00
|
|
|
|
USE_MKLDNN = setBool mklDnnSupport;
|
|
|
|
|
USE_MKLDNN_CBLAS = setBool mklDnnSupport;
|
2020-05-03 01:40:27 +01:00
|
|
|
|
|
2019-12-17 17:55:43 +00:00
|
|
|
|
preBuild = ''
|
|
|
|
|
export MAX_JOBS=$NIX_BUILD_CORES
|
|
|
|
|
${python.interpreter} setup.py build --cmake-only
|
|
|
|
|
${cmake}/bin/cmake build
|
|
|
|
|
'';
|
|
|
|
|
|
2018-09-12 08:22:52 +01:00
|
|
|
|
preFixup = ''
|
|
|
|
|
function join_by { local IFS="$1"; shift; echo "$*"; }
|
|
|
|
|
function strip2 {
|
|
|
|
|
IFS=':'
|
|
|
|
|
read -ra RP <<< $(patchelf --print-rpath $1)
|
|
|
|
|
IFS=' '
|
|
|
|
|
RP_NEW=$(join_by : ''${RP[@]:2})
|
|
|
|
|
patchelf --set-rpath \$ORIGIN:''${RP_NEW} "$1"
|
|
|
|
|
}
|
|
|
|
|
for f in $(find ''${out} -name 'libcaffe2*.so')
|
|
|
|
|
do
|
|
|
|
|
strip2 $f
|
|
|
|
|
done
|
|
|
|
|
'';
|
|
|
|
|
|
2018-12-24 11:46:51 +00:00
|
|
|
|
# Override the (weirdly) wrong version set by default. See
|
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/52437#issuecomment-449718038
|
|
|
|
|
# https://github.com/pytorch/pytorch/blob/v1.0.0/setup.py#L267
|
|
|
|
|
PYTORCH_BUILD_VERSION = version;
|
|
|
|
|
PYTORCH_BUILD_NUMBER = 0;
|
|
|
|
|
|
2021-04-10 07:08:08 +01:00
|
|
|
|
USE_SYSTEM_NCCL=setBool useSystemNccl; # don't build pytorch's third_party NCCL
|
2019-10-20 22:07:04 +01:00
|
|
|
|
|
2018-12-25 02:00:13 +00:00
|
|
|
|
# Suppress a weird warning in mkl-dnn, part of ideep in pytorch
|
|
|
|
|
# (upstream seems to have fixed this in the wrong place?)
|
|
|
|
|
# https://github.com/intel/mkl-dnn/commit/8134d346cdb7fe1695a2aa55771071d455fae0bc
|
2019-10-20 22:07:04 +01:00
|
|
|
|
# https://github.com/pytorch/pytorch/issues/22346
|
|
|
|
|
#
|
|
|
|
|
# Also of interest: pytorch ignores CXXFLAGS uses CFLAGS for both C and C++:
|
|
|
|
|
# https://github.com/pytorch/pytorch/blob/v1.2.0/setup.py#L17
|
2019-12-17 17:55:43 +00:00
|
|
|
|
NIX_CFLAGS_COMPILE = lib.optionals (blas.implementation == "mkl") [ "-Wno-error=array-bounds" ];
|
2018-12-25 02:00:13 +00:00
|
|
|
|
|
2019-03-06 21:34:26 +00:00
|
|
|
|
nativeBuildInputs = [
|
2019-10-20 22:07:04 +01:00
|
|
|
|
cmake
|
2020-11-24 15:29:28 +00:00
|
|
|
|
util-linux
|
2019-10-20 22:07:04 +01:00
|
|
|
|
which
|
|
|
|
|
ninja
|
2019-04-22 03:31:55 +01:00
|
|
|
|
] ++ lib.optionals cudaSupport [ cudatoolkit_joined ];
|
2019-03-06 21:34:26 +00:00
|
|
|
|
|
2020-08-26 09:46:22 +01:00
|
|
|
|
buildInputs = [ blas blas.provider ]
|
2019-12-17 17:55:43 +00:00
|
|
|
|
++ lib.optionals cudaSupport [ cudnn magma nccl ]
|
2018-12-25 01:59:40 +00:00
|
|
|
|
++ lib.optionals stdenv.isLinux [ numactl ];
|
2017-11-22 22:02:34 +00:00
|
|
|
|
|
2017-07-16 20:15:05 +01:00
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
|
cffi
|
2019-10-20 22:07:04 +01:00
|
|
|
|
click
|
2017-07-16 20:15:05 +01:00
|
|
|
|
numpy
|
|
|
|
|
pyyaml
|
2020-10-28 10:58:55 +00:00
|
|
|
|
typing-extensions
|
2019-12-17 17:55:43 +00:00
|
|
|
|
# the following are required for tensorboard support
|
|
|
|
|
pillow six future tensorflow-tensorboard protobuf
|
2021-01-10 12:40:19 +00:00
|
|
|
|
] ++ lib.optionals MPISupport [ mpi ]
|
2020-10-28 10:58:55 +00:00
|
|
|
|
++ lib.optionals (pythonOlder "3.7") [ dataclasses ];
|
2019-10-20 22:07:04 +01:00
|
|
|
|
|
2019-12-17 17:55:43 +00:00
|
|
|
|
checkInputs = [ hypothesis ninja psutil ];
|
2019-10-20 22:07:04 +01:00
|
|
|
|
|
2020-05-03 01:40:27 +01:00
|
|
|
|
# Tests take a long time and may be flaky, so just sanity-check imports
|
|
|
|
|
doCheck = false;
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
|
"torch"
|
|
|
|
|
];
|
|
|
|
|
|
2019-12-17 17:55:43 +00:00
|
|
|
|
checkPhase = with lib.versions; with lib.strings; concatStringsSep " " [
|
|
|
|
|
cudaStubEnv
|
|
|
|
|
"${python.interpreter} test/run_test.py"
|
|
|
|
|
"--exclude"
|
|
|
|
|
(concatStringsSep " " [
|
|
|
|
|
"utils" # utils requires git, which is not allowed in the check phase
|
|
|
|
|
|
|
|
|
|
# "dataloader" # psutils correctly finds and triggers multiprocessing, but is too sandboxed to run -- resulting in numerous errors
|
|
|
|
|
# ^^^^^^^^^^^^ NOTE: while test_dataloader does return errors, these are acceptable errors and do not interfere with the build
|
|
|
|
|
|
|
|
|
|
# tensorboard has acceptable failures for pytorch 1.3.x due to dependencies on tensorboard-plugins
|
|
|
|
|
(optionalString (majorMinor version == "1.3" ) "tensorboard")
|
|
|
|
|
])
|
|
|
|
|
];
|
2019-10-20 22:07:04 +01:00
|
|
|
|
postInstall = ''
|
|
|
|
|
mkdir $dev
|
|
|
|
|
cp -r $out/${python.sitePackages}/torch/include $dev/include
|
2019-12-17 17:55:43 +00:00
|
|
|
|
cp -r $out/${python.sitePackages}/torch/share $dev/share
|
2020-07-07 14:15:46 +01:00
|
|
|
|
|
2020-12-03 07:30:18 +00:00
|
|
|
|
# Fix up library paths for split outputs
|
|
|
|
|
substituteInPlace \
|
|
|
|
|
$dev/share/cmake/Torch/TorchConfig.cmake \
|
|
|
|
|
--replace \''${TORCH_INSTALL_PREFIX}/lib "$lib/lib"
|
|
|
|
|
|
|
|
|
|
substituteInPlace \
|
|
|
|
|
$dev/share/cmake/Caffe2/Caffe2Targets-release.cmake \
|
|
|
|
|
--replace \''${_IMPORT_PREFIX}/lib "$lib/lib"
|
|
|
|
|
|
2020-07-07 14:15:46 +01:00
|
|
|
|
mkdir $lib
|
|
|
|
|
cp -r $out/${python.sitePackages}/torch/lib $lib/lib
|
2019-10-20 22:07:04 +01:00
|
|
|
|
'';
|
|
|
|
|
|
2021-01-24 00:29:22 +00:00
|
|
|
|
postFixup = lib.optionalString stdenv.isDarwin ''
|
2020-08-06 09:02:46 +01:00
|
|
|
|
for f in $(ls $lib/lib/*.dylib); do
|
|
|
|
|
install_name_tool -id $lib/lib/$(basename $f) $f || true
|
2019-10-20 22:07:04 +01:00
|
|
|
|
done
|
|
|
|
|
|
2020-08-06 09:02:46 +01:00
|
|
|
|
install_name_tool -change @rpath/libshm.dylib $lib/lib/libshm.dylib $lib/lib/libtorch_python.dylib
|
|
|
|
|
install_name_tool -change @rpath/libtorch.dylib $lib/lib/libtorch.dylib $lib/lib/libtorch_python.dylib
|
|
|
|
|
install_name_tool -change @rpath/libc10.dylib $lib/lib/libc10.dylib $lib/lib/libtorch_python.dylib
|
2017-07-16 20:15:05 +01:00
|
|
|
|
|
2020-08-06 09:02:46 +01:00
|
|
|
|
install_name_tool -change @rpath/libc10.dylib $lib/lib/libc10.dylib $lib/lib/libtorch.dylib
|
2019-10-20 22:07:04 +01:00
|
|
|
|
|
2020-08-06 09:02:46 +01:00
|
|
|
|
install_name_tool -change @rpath/libtorch.dylib $lib/lib/libtorch.dylib $lib/lib/libcaffe2_observers.dylib
|
|
|
|
|
install_name_tool -change @rpath/libc10.dylib $lib/lib/libc10.dylib $lib/lib/libcaffe2_observers.dylib
|
2019-10-20 22:07:04 +01:00
|
|
|
|
|
2020-08-06 09:02:46 +01:00
|
|
|
|
install_name_tool -change @rpath/libtorch.dylib $lib/lib/libtorch.dylib $lib/lib/libcaffe2_module_test_dynamic.dylib
|
|
|
|
|
install_name_tool -change @rpath/libc10.dylib $lib/lib/libc10.dylib $lib/lib/libcaffe2_module_test_dynamic.dylib
|
2019-10-20 22:07:04 +01:00
|
|
|
|
|
2020-08-06 09:02:46 +01:00
|
|
|
|
install_name_tool -change @rpath/libtorch.dylib $lib/lib/libtorch.dylib $lib/lib/libcaffe2_detectron_ops.dylib
|
|
|
|
|
install_name_tool -change @rpath/libc10.dylib $lib/lib/libc10.dylib $lib/lib/libcaffe2_detectron_ops.dylib
|
2019-10-20 22:07:04 +01:00
|
|
|
|
|
2020-08-06 09:02:46 +01:00
|
|
|
|
install_name_tool -change @rpath/libtorch.dylib $lib/lib/libtorch.dylib $lib/lib/libshm.dylib
|
|
|
|
|
install_name_tool -change @rpath/libc10.dylib $lib/lib/libc10.dylib $lib/lib/libshm.dylib
|
2017-07-16 20:15:05 +01:00
|
|
|
|
'';
|
2017-11-22 22:02:34 +00:00
|
|
|
|
|
2021-03-09 08:50:49 +00:00
|
|
|
|
meta = with lib; {
|
2018-12-25 01:58:04 +00:00
|
|
|
|
description = "Open source, prototype-to-production deep learning platform";
|
2020-04-01 02:11:51 +01:00
|
|
|
|
homepage = "https://pytorch.org/";
|
2021-03-09 08:50:49 +00:00
|
|
|
|
license = licenses.bsd3;
|
|
|
|
|
platforms = with platforms; linux ++ lib.optionals (!cudaSupport) darwin;
|
|
|
|
|
maintainers = with maintainers; [ danieldk teh thoughtpolice tscholak ]; # tscholak esp. for darwin-related builds
|
|
|
|
|
# error: use of undeclared identifier 'noU'; did you mean 'no'?
|
|
|
|
|
broken = stdenv.isDarwin;
|
2017-07-16 20:15:05 +01:00
|
|
|
|
};
|
|
|
|
|
}
|