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.
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.
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.
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.
Upload your log file. Large files are processed in your browser. Only selected evidence is submitted when you run diagnosis.
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.
| Symptom | Possible 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 tile | The 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
- 1Run dmesg -T | grep -iE 'i915|xe|guc|hang|reset' at the failure timestamp.
- 2Run sycl-ls and xpu-smi discovery to confirm all expected GPU tiles remain enumerated.
- 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.
Searchable error signature
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 logsNo 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
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 / Stack | Recommendation | Notes |
|---|---|---|
| Kernel hangcheck in dmesg | Reproduce with smaller batch or ZE_AFFINITY_MASK | Long compute kernels without preemption can trigger i915/xe hangcheck resets. |
| Multi-rank oneCCL timeout | Inspect the rank with DEVICE_LOST first | Peers time out only because the rank that lost its Level Zero device stopped answering. |
With the fix vs without the fix
| Dimension | With the fix | Without the fix |
|---|---|---|
| Diagnostic tool | xpu-smi, sycl-ls, and dmesg i915/xe logs | Running nvidia-smi on an Intel XPU host |
| Tile isolation | ZE_AFFINITY_MASK single-tile reproducer | Retrying 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
UR_RESULT_ERROR_DEVICE_LOST -> check dmesg (i915/xe reset) + xpu-smi + sycl-ls -> single-tile ZE_AFFINITY_MASK test
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 extensionvLLM 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 errorsFrequently asked questions
Questions engineers and on-call staff commonly ask about this failure.
What does UR_RESULT_ERROR_DEVICE_LOST mean?
Why did my multi-GPU job also log a collective timeout?
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.