You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/sources/building-from-source.rst
+20-1Lines changed: 20 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,7 +125,9 @@ An environment variable ``$DALROOT`` must be set to the path containing the |one
125
125
126
126
export DALROOT="$CONDA_PREFIX"
127
127
128
-
.. important:: If the |onedal| is not under a default system path, in order to be able to load it after compiling the |sklearnex|, its path must be added to an environment variable such as ``$LD_LIBRARY_PATH``, or the |sklearnex| must be built with argument ``--abs-rpath`` (see rest of this document for details).
128
+
.. important:: On Linux*, if the |onedal| is not under a default system path, in order to be able to load it after compiling the |sklearnex|, its path must be added to an environment variable such as ``$LD_LIBRARY_PATH``, or the |sklearnex| must be built with argument ``--abs-rpath`` (see rest of this document for details).
129
+
130
+
.. important:: On Windows*, if the |onedal| is installed at the system level (as opposed to being installed from ``pip`` or ``conda``) or is otherwise not under a default Python path (e.g. if building it from source), the environment variable ``%DALROOT%`` also needs to be set at runtime in order to import the Python modules that link against it.
129
131
130
132
MPI
131
133
***
@@ -316,6 +318,23 @@ By default, a conda environment will first try to load oneTBB from its own packa
316
318
317
319
In such cases, it is advised to either uninstall oneTBB from ``pip``/``conda`` (it will be loaded from the |onedal| library which links to it), or modify the order of search paths in environment variables like ``$LD_LIBRARY_PATH`` to prefer the one with which the |onedal| was compiled instead of the one from ``conda``.
318
320
321
+
On Windows*, environment variable ``%TBBROOT%`` will also be inspected at runtime to search for DLL files, but note again that if there are oneTBB installations from ``pip`` or ``conda``, those will be preferred by the Python interpreter instead.
322
+
323
+
Loading dependencies on Windows*
324
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
325
+
326
+
On Windows*, when dependencies such as oneTBB and oneMKL are installed through package managers like ``pip`` or ``conda``, their DLL files will be placed under paths that the Python interpreter searches by default.
327
+
328
+
However, when the dependencies are installed at the system level, their DLL files will not be findable under Python paths, and the Python interpreter will not look for paths set under environment variable ``%PATH%`` that activation scripts modify.
329
+
330
+
As such, when running on Windows*, the |sklearnex| will also try to load DLL files from folders specified in the ``*ROOT`` environment variables set by the activation scripts of its dependencies. This is done at runtime (meaning that the variables may differ from what was set at compile time), so if using system installs of dependencies, the activation scripts (``.bat`` files) defining these variables need to be invoked before launching the Python process.
331
+
332
+
The following environment variables are used to search for DLL files on Windows*:
0 commit comments