Skip to content

Commit 825bf3d

Browse files
authored
update the way to check numpy build information
1 parent b7f2142 commit 825bf3d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/train/env.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ def set_mkl():
2424
https://github.com/numpy/numpy/issues/12374
2525
"""
2626

27-
if 'mkl_info' in np.__config__.__dict__ or 'mkl_rt' in np.__config__.blas_mkl_info['libraries']:
27+
# check whether the numpy is built by mkl, see
28+
# https://github.com/numpy/numpy/issues/14751
29+
if 'mkl_rt' in np.__config__.get_info("blas_mkl_info").get('libraries', []):
2830
set_env_if_empty("KMP_BLOCKTIME", "0")
2931
set_env_if_empty("KMP_AFFINITY", "granularity=fine,verbose,compact,1,0")
3032
reload(np)

0 commit comments

Comments
 (0)