-
Notifications
You must be signed in to change notification settings - Fork 22
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
[packaging] Segmentation Fault when importing dpnp installed from the intel conda channel #1149
Comments
For information, upon installing dpctl in that env (from the intel channel) I cannot get any device:
I also tried to install from the wheel using pip in another empty Python env on the same machine and also get a segfault. |
I cannot reproduce the problem on my machine:
Conda environment specification
|
I can reproduce the same problem on a machine with a 11th Gen Intel CPU. |
EDIT: I installed the oneAPI basekit from https://www.intel.com/content/www/us/en/develop/documentation/installation-guide-for-intel-oneapi-toolkits-linux/top/installation/install-using-package-managers/apt.html and if I use the embedded python env activated by running This confirms that there is a packaging issue for dpnp or its dependencies on the |
@ogrisel Package SYCL guarantees that host device is always available even if all plug-ins failed. Host device is disabled by default in DPC++ runtime for performance reasons (the salient assumption here is that CPU driver is always available). You can enable host device by setting env. variable CPU driver is being loaded by the OpenCL plugin for SYCL. To succeed it needs to open It may be insightful to inspect Loading these from elsewhere may be the problem. P.S. You do not need to activate the whole of oneAPI to work with DPC++. I only activate the compiler, like so Activation of the compiler, or oneAPI likely modifies |
Thanks @oleksandr-pavlyk. Setting
Still users should not have to set environment variables to avoid a segfault in a Python program importing a module with the default packaging. If this problem cannot be fixed by default in Or at least raise a |
Also, this laptop has an Iris graphics card:
why doesn't it show up in the list of SYCL devices returned by |
You need to install drivers on your machine. Here are instructions for 20.04: https://dgpu-docs.intel.com/installation-guides/ubuntu/ubuntu-focal.html Perhaps you could try adapting it by changing 'focal' to 'impish'. |
Thanks that did it. I used the |
Actually the error message before the segfault points to: which among other many things has a link to the drivers installation page. But it would be nice to have more tailored error message (and raised by a catchable
|
For information here is the output of
|
@ogrisel Thank you for sharing the output. It seems to point out to OpenCL loader not knowing where to find CPU driver. Could you please try the following $ OCL_ICD_FILENAMES=libintelocl_emu.so:libalteracl.so:libintelocl.so python -c "import dpctl; print(dpctl.select_cpu_device())" My output:
|
Indeed:
while without it:
|
After an upgrade to Ubuntu 22.04, I can no longer list the GPU device with I checked an all the packages listed in https://dgpu-docs.intel.com/installation-guides/ubuntu/ubuntu-focal.html are still installed and my user belong to the
Is there any diagnostic tool to run see if the driver is properly loaded? I tried to look through the |
Try checking
|
I get the same output as you do with the I got another system update and reboot in the mean time and here are the new versions of the APT packages:
I also updated the versions of the packages in the conda env:
and now I no longer get the segfault when importing
|
Here a gdb backtrace for the last command:
|
Olivier, you need to upgrade level-zero from 1.7.9 to 1.7.15. Please get debian files from https://github.com/oneapi-src/level-zero/releases/tag/v1.7.15 and install them using We experienced a similar issue and upgrade resolved it. |
Thanks, however that does not seem to work in my case:
|
@ogrisel Please make sure that level-zero implementation for Intel GPU is also updated:
You can get the compute runtime debian packages from https://github.com/intel/compute-runtime |
Indeed the version installed with apt is older:
I manually wget'ed the deb files as described in: https://github.com/intel/compute-runtime/releases/tag/22.18.23063 and now it works for me, thanks! I think this issue should still stay open as long as a bad driver install causes an import of dpnp or a call to |
Prior to installing the latest |
@ogrisel, there are conda packages from conda-forge. |
@isuruf is I uninstalled
I checked that my GPU driver was still active with:
and the
At least, now |
For reference, it seems that this package is lagging by several releases: https://github.com/conda-forge/intel-compute-runtime-feedstock/pulls But for the record I think it would be great to be able to install those runtime libraries via conda-forge. That would definitely help with adoption of SYCL-optimized libraries on Intel hardware in the Python ecosystem. |
Steps to reproduce:
This machine is an Intel machine:
So I think the hardware requirements should be fulfilled and the software requirements should automatically be installed by the conda dependency solver and the
intel
channel. Here is the conda env:Here is a gdb backtrace of the same import statement:
The text was updated successfully, but these errors were encountered: