Skip to content

Commit

Permalink
python3Packages.pytorch: remove oneDNN dependency
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
danieldk committed Aug 26, 2020
1 parent ff92674 commit a4ed797
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkgs/development/python-modules/pytorch/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
openMPISupport ? false, openmpi ? null,
buildDocs ? false,
cudaArchList ? null,
numpy, pyyaml, cffi, click, typing, cmake, oneDNN, hypothesis, numactl, psutil,
numpy, pyyaml, cffi, click, typing, cmake, hypothesis, numactl, psutil,
linkFarm, symlinkJoin,

# virtual pkg that consistently instantiates blas across nixpkgs
Expand Down Expand Up @@ -159,9 +159,9 @@ in buildPythonPackage rec {

USE_MKL = blas.implementation == "mkl";

# Unlike MKL, MKLDNN is FOSS, so we enable support for it by default. Note
# that this was renamed to dnnl and then renamed again to oneDNN upstream, but
# pytorch still calls it by the old name mkldnn.
# 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.
USE_MKLDNN = mklDnnSupport;
USE_MKLDNN_CBLAS = mklDnnSupport;

Expand Down Expand Up @@ -210,7 +210,7 @@ in buildPythonPackage rec {
ninja
] ++ lib.optionals cudaSupport [ cudatoolkit_joined ];

buildInputs = [ blas blas.provider oneDNN ]
buildInputs = [ blas blas.provider ]
++ lib.optionals cudaSupport [ cudnn magma nccl ]
++ lib.optionals stdenv.isLinux [ numactl ];

Expand Down

0 comments on commit a4ed797

Please sign in to comment.