-
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
dpctl pip install broken on windows for python3.11 #1745
Comments
temporary fix: import os, site
path_to_env = site.getsitepackages()[0]
path_to_libs = os.path.join(path_to_env, "Library", "bin")
os.add_dll_directory(path_to_libs)
import dpctl |
here is a rough github workflow which can show the error. also when fixed it doesnt show any devices (second error? i was able to install manually the dpcpp compiler separately using the offline installer and yield an opencl device via sycl-ls). also broken for 3.9
|
it looks like conda on windows has the same behavior EDIT: erroneous claim, this issue is addressed in another Turns out that there is a bug in the intel channel for windows and the vc14_runtime |
Second issue with missing devices discussed here: #1751 |
Since location of Library\bin in virtual environment is not on the default search path, importing of dpctl failes due to unmet dependencies for native extensions of dpctl submodules. This change introduces _init_helper.py which implements the following logic using built-in os Python module: 1. If os.add_dll_directory exists, and VIRTUAL_ENV environment variable is set, and os.path.join(os.environ["VIRTUAL_ENV"], "Library", "bin") exists, call os.add_dll_directory with that directory. With this change the gh-1745 is fixed, and "python -m dpctl -f" works out of the box. Only GPU devices are visible, and to enable CPU device two additional steps must be performed: 1. Edit %VIRUAL_ENV%\Library\bin\cl.cfg and set CL_CONFIG_TBB_DLL_PATH variable at the bottom of the configuration file to the expanded value of %VIRUAL_ENV%\Library\bin\tbb12.dll but use forward slashes, instead of native backward slashes. 2. Append %VIRUAL_ENV%\Library\bin to the PATH using `set "PATH=%PATH%:%VIRTUAL_ENV%\Library\bin"` After these changes `python -m dpctl -f` should see CPU device.
Since location of Library\bin in virtual environment is not on the default search path, importing of dpctl failes due to unmet dependencies for native extensions of dpctl submodules. This change introduces _init_helper.py which implements the following logic using built-in os Python module: 1. If os.add_dll_directory exists, and VIRTUAL_ENV environment variable is set, and os.path.join(os.environ["VIRTUAL_ENV"], "Library", "bin") exists, call os.add_dll_directory with that directory. With this change the gh-1745 is fixed, and "python -m dpctl -f" works out of the box. Only GPU devices are visible, and to enable CPU device two additional steps must be performed: 1. Edit %VIRUAL_ENV%\Library\bin\cl.cfg and set CL_CONFIG_TBB_DLL_PATH variable at the bottom of the configuration file to the expanded value of %VIRUAL_ENV%\Library\bin\tbb12.dll but use forward slashes, instead of native backward slashes. 2. Append %VIRUAL_ENV%\Library\bin to the PATH using `set "PATH=%PATH%:%VIRTUAL_ENV%\Library\bin"` After these changes `python -m dpctl -f` should see CPU device.
Closing as completed via gh-1922. |
System info:
Using python3.11
Reproducer
Not sure if I am doing something wrong, but I am seeing this failure locally and in github action VMs using pip
The text was updated successfully, but these errors were encountered: