提交 022f1890 authored 作者: Ben Mares's avatar Ben Mares 提交者: Ricardo Vieira

Fix MKL BLAS detection

It seems that libiomp5.lib has been renamed to libiomp5md.lib, so the detection was failing. Add another search step with the new library name. TODO: is there a more modern approach? Co-authored-by: 's avatarLuciano Paz <luciano.paz.neuro@gmail.com>
上级 602eb04c
...@@ -2890,7 +2890,7 @@ def default_blas_ldflags() -> str: ...@@ -2890,7 +2890,7 @@ def default_blas_ldflags() -> str:
if rpath is not None: if rpath is not None:
maybe_add_to_os_environ_pathlist("PATH", rpath) maybe_add_to_os_environ_pathlist("PATH", rpath)
try: try:
# 1. Try to use MKL with INTEL OpenMP threading # 1a. Try to use MKL with INTEL OpenMP threading
_logger.debug("Checking MKL flags with intel threading") _logger.debug("Checking MKL flags with intel threading")
return _check_libs( return _check_libs(
all_libs, all_libs,
...@@ -2906,6 +2906,24 @@ def default_blas_ldflags() -> str: ...@@ -2906,6 +2906,24 @@ def default_blas_ldflags() -> str:
) )
except Exception as e: except Exception as e:
_logger.debug(e) _logger.debug(e)
try:
# 1b. Try to use MKL with INTEL OpenMP threading with renamed iomp5 library
# Ref: <https://www.intel.com/content/www/us/en/docs/onemkl/developer-guide-windows/2024-1/selecting-libraries-to-link-with.html>
_logger.debug("Checking MKL flags with intel threading, iomp5md")
return _check_libs(
all_libs,
required_libs=[
"mkl_core",
"mkl_rt",
"mkl_intel_thread",
"iomp5md",
"pthread",
],
extra_compile_flags=[f"-Wl,-rpath,{rpath}"] if rpath is not None else [],
cxx_library_dirs=cxx_library_dirs,
)
except Exception as e:
_logger.debug(e)
try: try:
# 2. Try to use MKL with GNU OpenMP threading # 2. Try to use MKL with GNU OpenMP threading
_logger.debug("Checking MKL flags with GNU OpenMP threading") _logger.debug("Checking MKL flags with GNU OpenMP threading")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论