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
{{ message }}
Repository navigation
windows pip installation doesn't find openCL cpu drivers properly #1751
By installing the opencl cpu driver from here: and including the following path:
set PATH="C:\Program Files (x86)\Common Files\Intel\Shared Libraries\bin;"%PATH%
The pip version can recover the CPU sycl device.
Could be this is an upstream issue with intel-opencl-rt repository? Either a warning needs to be added to the documentation that the drivers must be installed separately in the pip path, or this would need to be fixed.
changed the title [-]windows pip installation doesn't link openCL cpu drivers properly[/-][+]windows pip installation doesn't find openCL cpu drivers properly[/+]on Jul 22, 2024
@icfaust This is because in conda, activation script is doing set "OCL_ICD_FILENAMES=%CONDA_PREFIX%\Library\bin\intelocl64.dll" . This step must be performed manually when using pip as package manager.
It may also be necessary to use os.add_dll_directory to ensure that the CPU driver is able to find the required TBB libraries in the Python layout.
@icfaust If you are attempting this in GitHub action runners, you need to take into account that the Python script is executed in a session with elevated privileges. OpenCL loader, for security purposes, ignores environment variable values.
Activity
[-]windows pip installation doesn't link openCL cpu drivers properly[/-][+]windows pip installation doesn't find openCL cpu drivers properly[/+]oleksandr-pavlyk commentedon Jul 24, 2024
@icfaust This is because in conda, activation script is doing
set "OCL_ICD_FILENAMES=%CONDA_PREFIX%\Library\bin\intelocl64.dll". This step must be performed manually when usingpipas package manager.It may also be necessary to use
os.add_dll_directoryto ensure that the CPU driver is able to find the required TBB libraries in the Python layout.icfaust commentedon Jul 29, 2024
Let me try this out on the github runner example to verify if this works.
icfaust commentedon Jul 30, 2024
It didn't seem to work...
oleksandr-pavlyk commentedon Jul 30, 2024
@icfaust If you are attempting this in GitHub action runners, you need to take into account that the Python script is executed in a session with elevated privileges. OpenCL loader, for security purposes, ignores environment variable values.
To make location of CPU implementation library, e.g.,
%CONDA_PREFIX%\Library\bin\intelocl64.dllknown to the loader, information must be provided through Windows registry, see https://github.com/IntelPython/dpctl/blob/master/.github/workflows/conda-package.yml#L317-L318The content of the script file "set-intel-ocl-icd-registry.ps1" is as follow:
oleksandr-pavlyk commentedon Dec 2, 2024
@icfaust please close unless the issue remains unresolved
icfaust commentedon Dec 3, 2024
Ah sorry about that