Skip to content

Level Zero Backend Error 20: UR_RESULT_ERROR_DEVICE_LOST

Fix RuntimeError: level_zero backend failed with error: 20 (UR_RESULT_ERROR_DEVICE_LOST) on Intel XPU and oneAPI GPUs using xpu-smi, sycl-ls, and kernel logs.

Quick answer

UR_RESULT_ERROR_DEVICE_LOST (error 20) means the Intel oneAPI Unified Runtime Level Zero backend lost contact with the GPU after a kernel hang, GPU reset, or driver fault. Inspect host dmesg for i915 or xe hangcheck resets, check device health with xpu-smi discovery, and verify runtime visibility with sycl-ls rather than running NVIDIA commands.

Symptom
RuntimeError: level_zero backend failed with error: 20 (UR_RESULT_ERROR_DEVICE_LOST)
Root cause
The Intel GPU engine hung, timed out under hangcheck, or hit a driver/memory fault that invalidated the active Level Zero device handle.
Recommended fix
ZE_AFFINITY_MASK=0.0
How Denpex helps
Denpex investigates Level Zero Backend Error 20: UR_RESULT_ERROR_DEVICE_LOST using the evidence you provide or your connected workload collects. Earlier rank, host or application evidence is needed to distinguish an initiating failure from a downstream report.
Hardware#intel-xpu#level-zero#oneapi#sycl#device-lost#vllm

What this failure is

UR_RESULT_ERROR_DEVICE_LOST is Unified Runtime error code 20 indicating that the Level Zero device context became invalid or the Intel GPU underwent a reset.

Live diagnosis, no signup

Is this what broke your run? Paste your log.

You're reading about Level Zero Backend Error 20: UR_RESULT_ERROR_DEVICE_LOST. Paste your own traceback and relevant evidence for an investigation of your workload, with a next action or a specific missing fact. A reference entry does not establish your cause. No account or card for the free diagnosis. Review data handling before submitting sensitive logs.

Before uploading, review cloud data handling and local options.

training_logs.txt
No log to hand? Try one:

Upload your log file. Large files are processed in your browser. Only selected evidence is submitted when you run diagnosis.

3 free cloud diagnoses per day

Why it happens (the mechanism)

Long-running or invalid SYCL/XPU kernels trigger the Linux i915 or xe GPU hangcheck timeout, causing the kernel driver to reset the tile or device and invalidate active Level Zero command lists.

What you'll observe

  • PyTorch XPU, IPEX, or vLLM Intel XPU workers abort with RuntimeError: level_zero backend failed with error: 20 (UR_RESULT_ERROR_DEVICE_LOST).
  • Multi-rank Intel GPU jobs stall in oneCCL until surviving peers report a collective timeout.

Common symptoms and what they mean

Check possible explanations against the incident evidence. A matching symptom alone does not establish its cause.

SymptomPossible explanation
RuntimeError: level_zero backend failed with error: 20 (UR_RESULT_ERROR_DEVICE_LOST)The Intel GPU engine hung, timed out under hangcheck, or hit a driver/memory fault that invalidated the active Level Zero device handle.
dmesg reports i915 or xe GPU HANG, GuC reset, or engine reset on the affected tileThe Intel GPU engine hung, timed out under hangcheck, or hit a driver/memory fault that invalidated the active Level Zero device handle.

Which systems are affected

  • Intel Data Center GPU Max, Flex, and Arc GPUs running oneAPI Level Zero
  • PyTorch XPU, Intel Extension for PyTorch (IPEX), and vLLM on Intel GPUs

How to confirm this is the problem

Use this checklist to test the hypothesis against a small reproduction. No single line proves the root cause, so preserve the preceding events and compare one variable at a time.

  • ✓Run sycl-ls and xpu-smi discovery immediately after the failure.
  • ✓Correlate the Python RuntimeError timestamp with i915/xe reset lines in dmesg -T.
  • ✓Reproduce on a single isolated tile with ZE_AFFINITY_MASK to confirm whether the fault follows the workload or hardware.

Root cause

  • The Intel GPU engine hung, timed out under hangcheck, or hit a driver/memory fault that invalidated the active Level Zero device handle.

The fix and how to prevent it

How to fix it

  • Inspect host kernel logs with dmesg -T | grep -iE 'i915|xe|guc|hang|reset' to separate a hung SYCL kernel from a driver or hardware telemetry fault.
  • Verify device availability and tile health using xpu-smi discovery and sycl-ls inside the same environment.
  • Pin a single tile with ZE_AFFINITY_MASK=0.0 for a reduced reproducer, or enable SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1 only according to your oneAPI release guidance.
  • Check whether the Intel compute-runtime, intel-level-zero-gpu, and Linux kernel driver versions match the PyTorch XPU or vLLM release matrix.

Step-by-step remediation

  1. 1Run dmesg -T | grep -iE 'i915|xe|guc|hang|reset' at the failure timestamp.
  2. 2Run sycl-ls and xpu-smi discovery to confirm all expected GPU tiles remain enumerated.
  3. 3Run a reduced single-tile workload and align compute-runtime with your PyTorch XPU release.

How to prevent it

  • Pin compatible oneAPI Base Toolkit, compute-runtime, and kernel i915/xe versions together.
  • Monitor xpu-smi health telemetry and dmesg GPU hang events across multi-tile nodes.

Save this diagnosis and catch the next crash automatically

All root cause, fix, and prevention steps above are free to read. Create a free account with any email or GitHub to keep your saved diagnosis history across the encyclopedia and run cloud checks, or use a work email below for the 30-day Team evaluation. No card required.

Or start a 30-day free Team trial (work email)

Verified work email unlocks all 14 fleet diagnostic tools, Slack alerts, and team history for 30 days. No card and no automatic charge.

Use your company email, for example alex@yourcompany.com.

Who qualifies?

Company email domains activate the free 30-day Team evaluation (up to 50 diagnoses a day) after an email and domain check, whatever mail provider you use. If we cannot verify your domain automatically, support reviews it: write to support@denpex.com. Free local diagnosis in the editor extension needs no account.

Using a personal email (Gmail, Outlook, Naver, QQ) or solo cluster? Create a free $0 account (no work email required) to save 7-day history and unlock AI fallback, or send a cluster crash log for a live walkthrough.
Already have an account? Sign in

Searchable error signature

search key
RuntimeError: level_zero backend failed with error: 20 (UR_RESULT_ERROR_DEVICE_LOST)

Use this text as a lookup key in logs and upstream issue trackers. It is not presented as a captured customer log. Confirm the cause from your own preceding events, versions, configuration and the cited references.

Diagnose your own log automatically

The root cause and fix steps above stay free. Create a free account to analyze full job logs, attribute the first failed rank, and keep saved incident history.

Sign up free. Analyze your cluster logs

No credit card. Daily allowance follows verified trust tier. Instant access.

Why the recommended fix works

Checking i915/xe kernel resets alongside xpu-smi and oneAPI runtime versions avoids wasting time on NVIDIA-specific commands and isolates kernel hangs from bad GPU tiles.

Code examples

snippet
sycl-ls
xpu-smi discovery
dmesg -T | grep -iE 'i915|xe|guc|hang|reset'

This snippet illustrates the entry-specific check. Verify the installed versions, permissions, target and workload context before using it. A command or API example is not proof of recovery.

Best practices by model family

Model / StackRecommendationNotes
Kernel hangcheck in dmesgReproduce with smaller batch or ZE_AFFINITY_MASKLong compute kernels without preemption can trigger i915/xe hangcheck resets.
Multi-rank oneCCL timeoutInspect the rank with DEVICE_LOST firstPeers time out only because the rank that lost its Level Zero device stopped answering.

With the fix vs without the fix

DimensionWith the fixWithout the fix
Diagnostic toolxpu-smi, sycl-ls, and dmesg i915/xe logsRunning nvidia-smi on an Intel XPU host
Tile isolationZE_AFFINITY_MASK single-tile reproducerRetrying full multi-tile collective job

Diagnostic note

“Based on oneAPI Unified Runtime result code specifications and Intel XPU diagnostic tooling. Example log shows the exact PyTorch/SYCL runtime error.”

Visual fingerprint

Level Zero error 20 triage
UR_RESULT_ERROR_DEVICE_LOST -> check dmesg (i915/xe reset) + xpu-smi + sycl-ls -> single-tile ZE_AFFINITY_MASK test
Use Intel xpu-smi and kernel i915/xe logs to separate kernel hangcheck resets from driver or hardware faults.

Diagnose this failure in VS Code

Select the traceback or open the failed terminal, then run Denpex locally to inspect matched failure patterns, supporting evidence and next checks without uploading the log. Verify recommendations against your workload before changing production.

Install the free VS Code extension

vLLM errors in context

vLLM failures cross request, model, KV cache, worker, kernel and host boundaries. The hub compares common signatures and evidence checks that help distinguish possible causes.

Compare related vllm errors

Frequently asked questions

Questions engineers and on-call staff commonly ask about this failure.

What does UR_RESULT_ERROR_DEVICE_LOST mean?
It is Unified Runtime error 20 from the Intel Level Zero backend indicating that the GPU context was lost after a driver reset, kernel hangcheck timeout, or device fault.
Why did my multi-GPU job also log a collective timeout?
When one worker loses its Level Zero device and exits or stalls, healthy peer ranks wait inside the collective until their watchdog timeout fires.

Don't just read the fix, diagnose your run

The encyclopedia explains documented failure patterns. Denpex investigates your logs, configuration and stack, shows the supporting evidence, and asks for missing details when needed.