Description
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:
- bugs.launchpad.net/ubuntu
- Issues with ubuntu 22.04 build intel/compute-runtime#588
- Can't detect gpu with intel-compute-runtime from ubuntu repositories intel/llvm#7659
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.
Activity
oleksandr-pavlyk commentedon Jan 27, 2023
I realize what's happening now. Using
apt-get install -y ocl-icd-opencl-dev intel-opencl-icdyou are getting rather old Intel-OpenCL-ICD, over a year old: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 commentedon Jan 30, 2023
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.
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
.debpackages. 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. Franklyintel-opencl-icdpackage 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.