Skip to content
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

The intel compute runtime from ubuntu repository is not compatible with dpctl #1010

Open
fcharras opened this issue Dec 6, 2022 · 2 comments

Comments

@fcharras
Copy link
Contributor

fcharras commented Dec 6, 2022

Within a new ubuntu:jammy docker container, this sequence of instructions should setup a working conda install for the numba_dpex stack (including dpctl)

apt-get update --quiet
apt-get install -y wget
apt-get install -y ocl-icd-opencl-dev intel-opencl-icd
cd
wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
bash Mambaforge-Linux-x86_64.sh
source .bashrc
mamba create -n my-dpex-env numba-dpex "intel::dpcpp_linux-64" -c dppy/label/dev -c conda-forge -c intel
mamba env config vars set OCL_ICD_FILENAMES_RESET=1 OCL_ICD_FILENAMES=libintelocl.so -n my-dpex-env
mamba activate my-dpex-env
python -c "import dpctl; print(dpctl.get_devices())"

and in particular the last command should print a list that includes an opencl gpu device, hinting that the gpu runtime works., but it turns out not to show any gpu device.

However, replacing the intel-opencl-icd package with a build from intel/compute-runtime github releases (same version) fixes the issue:

apt-get remove  intel-opencl-icd
wget https://github.com/intel/compute-runtime/releases/download/22.14.22890/intel-opencl-icd_22.14.22890_amd64.deb
dpkg -i intel-opencl-icd_22.14.22890_amd64.deb
python -c "import dpctl; print(dpctl.get_devices())"

and the get_devices command properly outputs gpu devices.

Many users trying to install this stack are going to run into troubles related to this, given that the apt-get based install is actually listed as recommended https://github.com/intel/compute-runtime#via-system-package-manager.

Relevant follow-up issues:

edit 19/12: the dpcpp runtime must be pinned until #1022 is solved, replace intel::dpcpp_linux-64 with "intel::dpcpp_linux-64<2023.0.0' in the conda install commmand.

@oleksandr-pavlyk
Copy link
Collaborator

I realize what's happening now. Using apt-get install -y ocl-icd-opencl-dev intel-opencl-icd you are getting rather old Intel-OpenCL-ICD, over a year old:

opavlyk@opavlyk-mobl:~$ sudo apt list --installed | grep intel

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

intel-opencl-icd/jammy,now 22.14.22890-1 amd64 [installed]
libdrm-intel1/jammy,now 2.4.110-1ubuntu1 amd64 [installed,automatic]
opavlyk@opavlyk-mobl:~$ sudo apt list --installed | grep gmm

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libigdgmm12/jammy,now 22.1.2+ds1-1 amd64 [installed,automatic]

If, instead, you followed instructions from https://dgpu-docs.intel.com/installation-guides/ubuntu/ubuntu-jammy-arc.html to install these packages from Intel-maintained repo of graphics drivers you'd be getting much newer driver stack and the problem would resolve itself.

@fcharras
Copy link
Contributor Author

I can understand that there are several sources for getting the runtime and that some of those are more reliable or up to date than other, my concern is that other users can be misled like I was to an unreliable source.

Looking back at it, I think my misfortune mostly comes from having read this README before any other documentation regarding the runtime, this repository being the only suggested source by the intel/llvm github repository. I'll try to follow up and suggest at least editing the README.

you are getting rather old Intel-OpenCL-ICD, over a year old:

It's true but the version is definitely not the issue here. The same version installed from there works. So the issue is the build recipe for ubuntu official .deb packages. There's a probability the build issue hasn't been fixed in latest ubuntu releases and it still ships packages that do not support all the scope of features it should. Frankly intel-opencl-icd package isn't a dependency of any other package in ubuntu repositories so I think it would be better removed from there (so that users have no choice but finding out the best source) than distributed in this state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants