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

intel/vllm:0.21.0-xpu

libze-intel-gpu1 26.14

Works. clinfo reports Intel(R) Graphics [0xe223], and PyTorch 2.11.0+xpu detects the device.

intel/intel-extension-for-pytorch:2.8.10-xpu

libze-intel-gpu1 25.18

Does not work. The device nodes are injected but clinfo lists only the CPU platform and torch.xpu.device_count() returns 0.

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

  1. 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")))'
    
  2. Deploy the following minimal pod to verify GPU device access. This example uses the device plugin resource name; for DRA clusters, replace the resources block with a ResourceClaimTemplate reference 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
    
  3. 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.

  4. Deploy the following clinfo pod 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
    
  5. Check the pod logs. The output should list an Intel(R) OpenCL Graphics platform 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 -l to get the full device report, including memory size and compute unit count.

  6. If either validation check fails, inspect the node directly. On OpenShift, use oc debug to 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 -nn shows eight 8086:e223 entries, /dev/dri/ contains eight renderD* nodes, and lsmod shows the xe module loaded.