-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
windows pip installation doesn't find openCL cpu drivers properly #1751
Comments
@icfaust This is because in conda, activation script is doing It may also be necessary to use |
Let me try this out on the github runner example to verify if this works. |
It didn't seem to work... |
@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., The content of the script file "set-intel-ocl-icd-registry.ps1" is as follow: #Requires -RunAsAdministrator
$conda_env_library = "$env:CONDA_PREFIX\Library"
if (-not (Test-Path -Path HKLM:\SOFTWARE\Khronos)) {
New-Item -Path HKLM:\SOFTWARE\Khronos
}
if (-not (Test-Path -Path HKLM:\SOFTWARE\Khronos\OpenCL)) {
New-Item -Path HKLM:\SOFTWARE\Khronos\OpenCL
}
if (-not (Test-Path -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors)) {
New-Item -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors
}
New-ItemProperty -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors -Name $conda_env_library\bin\intelocl64.dll -Value 0
Write-Host "Registry value: $(Get-Item -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors)" |
In this github action example, the conda environment can properly access the installed opencl driver, but pip cannot:
By installing the opencl cpu driver from here: and including the following 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.
The text was updated successfully, but these errors were encountered: