Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
[BUGFIX] Pip Build: use runtime.Features instead of manual check for …
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
access2rohit and ChaiBapchya authored Feb 22, 2021
1 parent 01d78f5 commit ea342cc
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions tools/pip/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,22 +141,16 @@ def skip_markdown_comments(md):
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':
Expand Down

0 comments on commit ea342cc

Please sign in to comment.