Verifying GPU Access
Use this procedure to validate that Intel GPUs are visible to OpenShift and usable from a test workload.
Choosing a test image
The container image must ship an Intel compute runtime new enough for your GPU, independently of the host kernel driver. On Intel® Arc™ Pro B70 Graphics, use an image built with libze-intel-gpu 26.x or later:
Image |
Compute runtime |
Intel® Arc™ Pro B70 |
|---|---|---|
|
|
Works. |
|
|
Does not work. The device nodes are injected but |
A newer tag does not guarantee a newer runtime, because the two image lines are rebuilt on different cadences. Check the runtime version in any candidate image before you adopt it:
podman run --rm docker.io/intel/vllm:0.21.0-xpu \
bash -c 'dpkg -l | grep -E "libze-intel-gpu1|intel-opencl-icd"'
Important
A container that reports XPU device count is zero! while /dev/dri/renderD* is present inside the container has a runtime that is too old for the GPU, not a scheduling or permissions problem. Check clinfo -l first: if no Intel(R) OpenCL Graphics platform appears, replace the image.
The intel/vllm image entrypoint sources /opt/intel/oneapi/setvars.sh and then runs whatever it is given. Always pass your test commands through args, never command, or PyTorch fails to import with ImportError: libccl.so.1: cannot open shared object file.
Validating GPU access
Check that GPU resources are advertised on the worker node.
# DRA clusters oc get resourceslices oc get resourceslices -o json | jq '.items[0].spec.devices[0] | {name, capacity}' # Device plugin clusters oc get node <gpu-node> -o jsonpath='{.status.allocatable}' | jq 'with_entries(select(.key|test("gpu.intel.com")))'
Deploy the following minimal pod to verify GPU device access. This example uses the device plugin resource name; for DRA clusters, replace the
resourcesblock with aResourceClaimTemplatereference as shown in Intel GPU Resource Driver (DRA).apiVersion: v1 kind: Pod metadata: name: gpu-detect spec: restartPolicy: Never containers: - name: detect image: docker.io/intel/vllm:0.21.0-xpu args: - bash - -c - | ls -la /dev/dri/ python -c "import torch; print('torch', torch.__version__); print('XPU devices:', torch.xpu.device_count()); [print(f' GPU {i}: {torch.xpu.get_device_name(i)}') for i in range(torch.xpu.device_count())]" resources: limits: gpu.intel.com/xe: 1
Check the pod logs. A successful run lists the injected device nodes and the detected GPU.
oc logs gpu-detect
Expected output on an Intel® Arc™ Pro B70:
crw-rw-rw-. 1 root irc 226, 5 card5 crw-rw-rw-. 1 root 797 226, 132 renderD132 torch 2.11.0+xpu XPU devices: 1 GPU 0: Intel(R) Graphics [0xe223]
Only the allocated GPU is visible inside the container, even on a node with eight GPUs. That is the expected behavior for both the device plugin and DRA.
Deploy the following
clinfopod to verify the userspace OpenCL stack.apiVersion: v1 kind: Pod metadata: name: gpu-clinfo spec: restartPolicy: Never containers: - name: clinfo image: docker.io/intel/vllm:0.21.0-xpu args: ["clinfo", "-l"] resources: limits: gpu.intel.com/xe: 1
Check the pod logs. The output should list an
Intel(R) OpenCL Graphicsplatform alongside the CPU platform.oc logs gpu-clinfo
Platform #0: Intel(R) OpenCL `-- Device #0: Intel(R) Xeon(R) 6747P Platform #1: Intel(R) OpenCL Graphics `-- Device #0: Intel(R) Graphics [0xe223]
Drop
-lto get the full device report, including memory size and compute unit count.If either validation check fails, inspect the node directly. On OpenShift, use
oc debugto inspect GPU hardware on a specific node.# List DRI devices oc debug node/<gpu-node-name> -- chroot /host ls /dev/dri/ # List GPU PCI devices with their PCI IDs oc debug node/<gpu-node-name> -- chroot /host lspci -nn | grep -iE "VGA|Display|3D" # Check xe driver binding oc debug node/<gpu-node-name> -- chroot /host sh -c 'lsmod | grep -E "^xe|^i915"'
On a healthy node with eight Intel® Arc™ Pro B70 GPUs,
lspci -nnshows eight8086:e223entries,/dev/dri/contains eightrenderD*nodes, andlsmodshows thexemodule loaded.