Fix PyTorch build with Intel MKL (#13464)

This commit is contained in:
Adam J. Stewart
2019-10-28 11:47:21 -05:00
committed by GitHub
parent b4e027e918
commit 33a34f9619

View File

@@ -169,6 +169,11 @@ def enable_or_disable(variant, keyword='USE', var=None, newer=False):
else:
env.set('NO_' + var, 'ON')
# Build system has problems locating MKL libraries
# See https://github.com/pytorch/pytorch/issues/24334
if 'mkl' in self.spec:
env.prepend_path('CMAKE_PREFIX_PATH', self.spec['mkl'].prefix.mkl)
env.set('MAX_JOBS', make_jobs)
enable_or_disable('cuda')