Skip to content

Commit

Permalink
DEV: Add path to tbb*.dll into environment in daal4py module init scr…
Browse files Browse the repository at this point in the history
…ipt (#2063)

* oneMKL migration: Fix for DLL loading issue on Windows
  • Loading branch information
Vika-F authored Sep 25, 2024
1 parent cf29d09 commit 65edc89
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion daal4py/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,17 @@
path_to_libs = os.path.join(path_to_env, "Library", "bin")
if sys.version_info.minor >= 8:
if "DALROOT" in os.environ:
dal_root_redist = os.path.join(os.environ["DALROOT"], "redist", arch_dir)
dal_root = os.environ["DALROOT"]
dal_root_redist = os.path.join(dal_root, "redist", arch_dir)
if os.path.exists(dal_root_redist):
os.add_dll_directory(dal_root_redist)
os.environ["PATH"] = dal_root_redist + os.pathsep + os.environ["PATH"]
if "TBBROOT" in os.environ:
tbb_root = os.environ["TBBROOT"]
tbb_root_redist = os.path.join(tbb_root, "bin")
if os.path.exists(tbb_root_redist):
os.add_dll_directory(tbb_root_redist)
os.environ["PATH"] = tbb_root_redist + os.pathsep + os.environ["PATH"]

try:
os.add_dll_directory(path_to_libs)
Expand Down

0 comments on commit 65edc89

Please sign in to comment.