Skip to content

Commit

Permalink
Add Num Threads for Debug Message
Browse files Browse the repository at this point in the history
  • Loading branch information
asistradition committed Aug 23, 2021
1 parent 2d50b37 commit d04a277
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sparse_dot_mkl/_mkl_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
# Since it's not on PyPi I don't want to make this an actual package dependency
# So without it just create mock functions and don't do version checking
try:
from mkl import get_version, get_version_string
from mkl import get_version, get_version_string, get_max_threads
except ImportError:
def get_version():
return None
Expand All @@ -53,6 +53,10 @@ def get_version():
def get_version_string():
return None


def get_max_threads():
return None

if get_version() is not None and get_version()["MajorVersion"] < 2020:
_verr_msg = "Loaded version of MKL is out of date: {v}".format(v=get_version_string())
warnings.warn(_verr_msg)
Expand Down Expand Up @@ -518,6 +522,7 @@ def print_mkl_debug():
print("mkl-service must be installed to get full debug messaging")
else:
print(get_version_string())
print("MKL Number of Threads: {n}".format(n=get_max_threads()))

print("MKL linked: {fn}".format(fn=_libmkl._name))
print("MKL interface {np} | {c}".format(np=MKL.MKL_INT_NUMPY, c=MKL.MKL_INT))
Expand Down

0 comments on commit d04a277

Please sign in to comment.