GPU Compute Software
Ask questions about Intel® Graphics Compute software technologies, such as OpenCL* GPU driver and oneAPI Level Zero
251 Discussions

IPEX-LLM Docker / WSL GPU Passthrough Issues

VladSRVZ
Beginner
392 Views

Hello,

I'm trying to get GPU passthrough working with Docker under WSL2 Ubuntu 22.04

The platform is Raptor Lake, with 4 A770 GPUs attached. Latest WHQL drivers are installed, all GPUs confirmed functioning correctly on the Windows 11 24H2 host (also tested with 23H2).

On the WSL Ubuntu host, everything seems to be set up and functioning correctly as well... for only 1 card (Issue 1):

 

$ ls /dev/dxg
/dev/dxg

$ glxinfo | grep "OpenGL renderer"
OpenGL renderer string: D3D12 (Intel(R) Arc(TM) A770 Graphics)

$ clinfo | grep "Intel"
Platform Name Intel(R) OpenCL Graphics
Platform Vendor Intel(R) Corporation
Platform Name Intel(R) OpenCL Graphics
Device Name Intel(R) Graphics [0x56a0]

 


Running the official ipex-llm image in Docker (under the WSL Ubuntu host) results in a seemingly correct device mapping, but a failure when it comes to detecting the Arc GPU as a CL device (Issue 2):

 

docker run -d --restart=always --net=bridge --device=/dev/dxg 
--name=ipex-llm 
-p 11434:11434 
-v ~/.ollama/models:/root/.ollama/models 
-e PATH=/llm/ollama:<OMITTED> 
-e OLLAMA_HOST=0.0.0.0 
-e no_proxy=localhost,127.0.0.1 
-e ZES_ENABLE_SYSMAN=1 
-e ENABLE_GPU=1 
-e OLLAMA_INTEL_GPU=true 
-e ONEAPI_DEVICE_SELECTOR=level_zero:0 
-e DEVICE=Arc 
--shm-size="16g" 
--memory="32G"
intelanalytics/ipex-llm-inference-cpp-xpu:latest
bash -c "cd /llm/scripts/ && source ipex-llm-init --gpu --device Arc && bash start-ollama.sh && tail -f /llm/ollama/ollama.log"

 

Tried forwarding both /dev/dri and /dev/dxg to the same avail.

 

$ ls /dev/dxg
/dev/dxg

$ glxinfo | grep "OpenGL renderer"
Error: unable to open display

$ clinfo | grep "Intel"
  Platform Name  Intel(R) FPGA Emulation Platform for OpenCL(TM)
  Platform Vendor  Intel(R) Corporation
  Platform Version  OpenCL 1.2 Intel(R) FPGA SDK for OpenCL(TM), Version 20.3
  Platform Extensions function suffix  IntelFPGA
  Platform Name  Intel(R) OpenCL
  Platform Vendor  Intel(R) Corporation
  Platform Name  Intel(R) FPGA Emulation Platform for OpenCL(TM)
  Device Name  Intel(R) FPGA Emulation Device
  Platform Name  Intel(R) OpenCL
  Device Name  Intel(R) Core(TM) i9-14900F

 


Ignoring the detection of more GPUs for now (Issue 1), why is the Arc GPU not picked up by clinfo when /dev/dri and /dev/xdg seem to exist, as well as all of the required Intel software (using the official ipex-llm image)?

Any input would be greatly appreciated, been banging my head on this one for two days now!

Labels (3)
0 Kudos
0 Replies
Reply