diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2020-05-10 19:40:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-10 19:40:00 -0500 |
commit | c03d4688e42b30bb7a9299d1a523bcf7ac55c080 (patch) | |
tree | 5bac1866d9c667ebb0e331e4b1d9de5de0d78180 /var | |
parent | 7d3b40fba45df7c6075d2668ab87708f34e1cd17 (diff) | |
download | spack-c03d4688e42b30bb7a9299d1a523bcf7ac55c080.tar.gz spack-c03d4688e42b30bb7a9299d1a523bcf7ac55c080.tar.bz2 spack-c03d4688e42b30bb7a9299d1a523bcf7ac55c080.tar.xz spack-c03d4688e42b30bb7a9299d1a523bcf7ac55c080.zip |
PyTorch: fix master and mkldnn builds (#16560)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/py-torch/package.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index 024e0d95b2..ce69a5581c 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -247,7 +247,7 @@ class PyTorch(PythonPackage, CudaPackage): enable_or_disable('mkldnn') if '@0.4:0.4.1+mkldnn' in self.spec: - env.set('MKLDNN_HOME', self.spec['intel-mkl-dnn'].prefix) + env.set('MKLDNN_HOME', self.spec['onednn'].prefix) enable_or_disable('nnpack') enable_or_disable('qnnpack') @@ -270,8 +270,9 @@ class PyTorch(PythonPackage, CudaPackage): enable_or_disable('lmdb', newer=True) enable_or_disable('binary', keyword='BUILD', newer=True) - env.set('PYTORCH_BUILD_VERSION', self.version) - env.set('PYTORCH_BUILD_NUMBER', 0) + if not self.spec.satisfies('@master'): + env.set('PYTORCH_BUILD_VERSION', self.version) + env.set('PYTORCH_BUILD_NUMBER', 0) # BLAS to be used by Caffe2 if '^mkl' in self.spec: |