File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
sparse_dot_mkl/_mkl_interface Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
### Version 0.9.2
2
2
3
3
* Explicit check for interface env MKL_INTERFACE_LAYER and interface selection in python.
4
+ Will raise a RuntimeWarning if ILP64 is requested but the 64-bit interface layer is unavailable.
5
+ Note that the MKL_INTERFACE_LAYER env must be set before this package is imported.
4
6
5
7
### Version 0.9.1
6
8
Original file line number Diff line number Diff line change @@ -108,22 +108,24 @@ def _empirical_set_dtype():
108
108
109
109
# Check to make sure that the MKL_Set_Interface_Layer call was correct
110
110
# And fail back to 32bit if it wasn't
111
- if MKL . MKL_INT is None and _mkl_interface_env == 'ILP64' :
111
+ if _mkl_interface_env == 'ILP64' :
112
112
try :
113
113
_validate_dtype ()
114
114
except (ValueError , RuntimeError ):
115
115
_warnings .warn (
116
116
"MKL_INTERFACE_LAYER=ILP64 failed to set MKL interface; "
117
- "64-bit integer support unavailable"
117
+ "64-bit integer support unavailable" ,
118
+ RuntimeWarning
118
119
)
119
120
MKL ._set_int_type (_ctypes .c_int , _np .int32 )
120
121
_validate_dtype ()
121
- elif MKL . MKL_INT is None and _mkl_interface_env == 'LP64' :
122
+ elif _mkl_interface_env == 'LP64' :
122
123
_validate_dtype ()
123
124
elif MKL .MKL_INT is None and _mkl_interface_env is not None :
124
125
_warnings .warn (
125
126
f"MKL_INTERFACE_LAYER value { _mkl_interface_env } invalid; "
126
- "set 'ILP64' or 'LP64'"
127
+ "set 'ILP64' or 'LP64'" ,
128
+ RuntimeWarning
127
129
)
128
130
_empirical_set_dtype ()
129
131
elif MKL .MKL_INT is None :
You can’t perform that action at this time.
0 commit comments