This is an automated email from the ASF dual-hosted git repository.
chaibapat25 pushed a commit to branch v1.x
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/v1.x by this push:
new ea342cc [BUGFIX] Pip Build: use runtime.Features instead of manual
check for mkldnn headers (#19195) (#19928)
ea342cc is described below
commit ea342cc2f48ad280c7aad50840001fdce7f1f14c
Author: Rohit Kumar Srivastava <[email protected]>
AuthorDate: Mon Feb 22 15:59:29 2021 -0800
[BUGFIX] Pip Build: use runtime.Features instead of manual check for mkldnn
headers (#19195) (#19928)
* use runtime Features instead of manual check
* move mxnet package closer to where its used
Co-authored-by: Chaitanya Prakash Bapat <[email protected]>
---
tools/pip/setup.py | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/tools/pip/setup.py b/tools/pip/setup.py
index 5874910..c76f386 100644
--- a/tools/pip/setup.py
+++ b/tools/pip/setup.py
@@ -141,22 +141,16 @@ else:
libraries.append('CUDA-10.0')
elif variant.startswith('CU92'):
libraries.append('CUDA-9.2')
- elif variant.startswith('CU91'):
- libraries.append('CUDA-9.1')
- elif variant.startswith('CU90'):
- libraries.append('CUDA-9.0')
- elif variant.startswith('CU80'):
- libraries.append('CUDA-8.0')
- elif variant.startswith('CU75'):
- libraries.append('CUDA-7.5')
- if variant.endswith('MKL'):
- libraries.append('MKLDNN')
+
+from mxnet.runtime import Features
+if Features().is_enabled("MKLDNN"):
+ libraries.append('MKLDNN')
short_description += ' This version uses {0}.'.format(' and '.join(libraries))
package_data = {'mxnet': [os.path.join('mxnet',
os.path.basename(LIB_PATH[0]))],
'dmlc_tracker': []}
-if variant != 'NATIVE':
+if Features().is_enabled("MKLDNN"):
shutil.copytree(os.path.join(CURRENT_DIR,
'mxnet-build/3rdparty/mkldnn/include'),
os.path.join(CURRENT_DIR, 'mxnet/include/mkldnn'))
if platform.system() == 'Linux':