8000 BLD: Fixed detection for recent MKL versions by xabellan · Pull Request #7908 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BLD: Fixed detection for recent MKL versions #7908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 8, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fixed MKL detection for recent versions of this library.
  • Loading branch information
Xavier Abellan Ecija committed Aug 5, 2016
commit 2088e1cdcfcf4972a664963ac8979d7138422231
22 changes: 3 additions & 19 deletions numpy/distutils/system_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ def calc_info(self):
class mkl_info(system_info):
section = 'mkl'
dir_env_var = 'MKLROOT'
_lib_mkl = ['mkl', 'vml', 'guide']
_lib_mkl = ['mkl_rt']

def get_mkl_rootdir(self):
mklroot = os.environ.get('MKLROOT', None)
Expand Down Expand Up @@ -997,15 +997,12 @@ def __init__(self):
system_info.__init__(self)
else:
from .cpuinfo import cpu
l = 'mkl' # use shared library
if cpu.is_Itanium():
plt = '64'
elif cpu.is_Xeon():
elif cpu.is_Intel() and cpu.is_64bit():
plt = 'intel64'
else:
plt = '32'
if l not in self._lib_mkl:
self._lib_mkl.insert(0, l)
system_info.__init__(
self,
default_lib_dirs=[os.path.join(mklroot, 'lib', plt)],
Expand All @@ -1030,20 +1027,7 @@ def calc_info(self):


class lapack_mkl_info(mkl_info):

def calc_info(self):
mkl = get_info('mkl')
if not mkl:
return
if sys.platform == 'win32':
lapack_libs = self.get_libs('lapack_libs', ['mkl_lapack'])
else:
lapack_libs = self.get_libs('lapack_libs',
['mkl_lapack32', 'mkl_lapack64'])

info = {'libraries': lapack_libs}
dict_append(info, **mkl)
self.set_info(**info)
pass


class blas_mkl_info(mkl_info):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for removing this? If the class is empty, a remark explaining why would be helpful.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to leave the class rather than remove it completely?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left it empty for consistency with the other mkl_info subclass blas_mkl_info, which was also empty. I guess you could remove both and just use the parent mkl_info class for both blas_mkl and lapack_mkl in the cl dictionary.

Expand Down
0