Skip to content

Commit 4707999

Browse files
Add get_intel_mkl_version() to helper.py
1 parent c0344e3 commit 4707999

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

dpnp/tests/helper.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,24 @@ def not_excluded(dtype):
372372
return dtypes
373373

374374

375+
def get_intel_mkl_version():
376+
"""
377+
Return the version of Intel MKL used by NumPy during testing.
378+
379+
The check is based on MKL backend name stored in Build Dependencies
380+
and only applies if Intel NumPy is detected.
381+
The version is extracted from the BLAS section of NumPy's build
382+
information.
383+
384+
Return None if Intel MKL is not used.
385+
"""
386+
if not is_intel_numpy():
387+
return None
388+
389+
build_deps = numpy.show_config(mode="dicts")["Build Dependencies"]
390+
return build_deps["blas"]["version"]
391+
392+
375393
def has_support_aspect16(device=None):
376394
"""
377395
Return True if the device supports 16-bit precision floating point operations,

0 commit comments

Comments
 (0)