Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion pytensor/link/c/cmodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -2890,7 +2890,7 @@ def default_blas_ldflags() -> str:
if rpath is not None:
maybe_add_to_os_environ_pathlist("PATH", rpath)
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")
return _check_libs(
all_libs,
Expand All @@ -2906,6 +2906,24 @@ def default_blas_ldflags() -> str:
)
except Exception as 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:
# 2. Try to use MKL with GNU OpenMP threading
_logger.debug("Checking MKL flags with GNU OpenMP threading")
Expand Down
Loading