[GSD-13011] Arc B580 (Battlemage G21, 8086:b080): Level Zero kernel compilation fails with "could not create an engine" despite IGC 2.36.3 + SYCL having BMG definitions
- Dominant language
- C++
- Stars
- 1.4k
- Forks
- 300
- PR merge metrics
- No merged PRs in 30d
Description
### Pre-submission Checklist
- [ ] I am using the latest GPU driver version ([releases](https://github.com/intel/compute-runtime/releases))
- [ ] I have searched for similar issues and found none
---
## System Information
### GPU Hardware
Intel Arc B580 (Battlemage G21) [8086:b080]
### DRI Devices Information
```
$ ls -la /dev/dri/
total 0
drwxr-xr-x 3 root root 100 7月 5 22:05 .
drwxr-xr-x 22 root root 4940 7月 5 22:06 ..
drwxr-xr-x 2 root root 80 7月 5 22:05 by-path
crw-rw----+ 1 root video 226, 1 7月 5 22:05 card1
crw-rw----+ 1 root render 226, 128 7月 5 22:05 renderD128
$ ls -la /dev/dri/by-path/
total 0
drwxr-xr-x 2 root root 80 7月 5 22:05 .
drwxr-xr-x 3 root root 100 7月 5 22:05 ..
lrwxrwxrwx 1 root root 8 7月 5 22:05 pci-0000:00:02.0-card -> ../card1
lrwxrwxrwx 1 root root 13 7月 5 22:05 pci-0000:00:02.0-render -> ../renderD128
```
### GPU Detailed Information (lspci output)
```
$ lspci -nn -k -s 0000:00:02.0
00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:b080] (rev 04)
Subsystem: Xiaomi Device [1d72:2424]
Kernel driver in use: xe
Kernel modules: xe
```
### Driver Version
26.22.38646.4-0
### Installed GPU Driver Packages
```
$ dpkg --list | grep -iE "igc|gmm|opencl|level-zero|fc|ocloc|libze|intel-oneapi"
ii clinfo 3.0.23.01.25-1build1
ii intel-igc-cm 1.0.176.54074-1029~24.04
ii intel-igc-core-2 2.36.3
ii intel-ocloc 26.22.38646.4-0
ii intel-oneapi-runtime-dpcpp-sycl-opencl-cpu 2026.1.0-235
ii intel-oneapi-runtime-opencl 2026.1.0-235
rc intel-opencl-icd 26.22.38646.4-0
ii libigc1 1.0.17791.16-1032~24.04
ii libigdfcl1 1.0.17791.16-1032~24.04
ii libigdgmm12:amd64 22.10.0
ii libze-intel-gpu1 26.22.38646.4-0
ii libze1 1.17.44.0-1022~24.04
ii ocl-icd-libopencl1:amd64 2.3.2-1build1
```
### Driver Installation Details
- Installation method: Intel official APT repository + oneAPI installer
- Added Intel repository for GPU driver packages
- Installed oneAPI 2026.1.0 base toolkit
- PyTorch XPU installed via pip from Intel channel
- No custom kernel parameters for GPU
### Linux Distribution
Ubuntu 24.04 LTS
### Kernel Version & Boot Parameters
```
$ uname -r
6.17.0-35-generic
$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-6.17.0-35-generic root=UUID=c9dfbc53-0f51-464e-a180-fe8dc56e6061 ro quiet splash i8042.nopnp=1 i8042.dumbkbd=1 vt.handoff=7
$ lsmod | grep -E 'i915|xe'
xe 3874816 10
gpu_sched 65536 1 xe
drm_gpuvm 49152 1 xe
drm_gpusvm_helper 36864 1 xe
drm_buddy 28672 1 xe
drm_ttm_helper 16384 1 xe
ttm 126976 2 drm_ttm_helper,xe
drm_exec 12288 2 drm_gpuvm,xe
drm_suballoc_helper 24576 1 xe
drm_display_helper 290816 1 xe
cec 98304 2 drm_display_helper,xe
i2c_algo_bit 16384 1 xe
intel_vsec 24576 3 intel_pmc_ssram_telemetry,pmt_telemetry,xe
video 77824 1 xe
```
---
## Issue Description
### Actual Behavior
GPU is detected and basic operations work, but kernel compilation fails for any non-trivial computation. Specifically:
1. `torch.xpu.is_available()` returns `True`
2. `torch.xpu.device_count()` returns `1`
3. Data transfer to XPU device works (e.g., `torch.randn(10,10).to("xpu")`)
4. Element-wise operations work (e.g., `x + 1.0`)
5. **Matrix multiplication fails**: `x @ x.T` → `RuntimeError: could not create an engine`
6. **`torch.xpu.get_device_name(0)` segfaults**
The SYCL runtime has Battlemage device definitions (`intel_gpu_bmg_g21`) and IGC has Xe2 code (`AllowSIMD16DropForXE2Plus`), suggesting the PCI ID → architecture mapping or kernel compilation flag path is broken.
### Expected Behavior
Kernel compilation should succeed for all operations on the Arc B580 (Battlemage G21), including matrix multiplication and other non-trivial GPU computations. `torch.xpu.get_device_name(0)` should return the device name without segfaulting.
### Reproduction Rate
Always reproduces - 100%
### Steps to Reproduce
1. Install Intel GPU driver 26.22.38646.4-0 with IGC 2.36.3
2. Install PyTorch 2.6.0+xpu from Intel channel
3. Run the following Python script:
```python
import torch
import intel_extension_for_pytorch
print("XPU available:", torch.xpu.is_available())
print("Device count:", torch.xpu.device_count())
x = torch.randn(10, 10).to("xpu")
y = x + 1.0 # works
print("Element-wise add OK")
# This fails:
y = x @ x.T
print("Matmul OK")
```
4. Observe `RuntimeError: could not create an engine` on the matmul line
5. Optionally, run `torch.xpu.get_device_name(0)` to observe segfault
---
## Regression Information
### Is this a regression?
- [ ] Yes, this is a regression - functionality that previously worked is now broken
This is a new GPU (Battlemage G21) and has never worked correctly with this software stack. Not a regression per se, but a missing/incomplete platform enablement.
---
## Diagnostics & Logs
### API Call Logs
Not yet collected with Unitrace. Can provide if needed.
### strace Logs
Not yet collected. Can provide if needed.
### System Logs / dmesg Output
```
$ dmesg | grep -i -E 'i915|xe|drm|gpu|bmg|battlemage|b080|error|fault|fail'
(No relevant GPU error messages found in dmesg)
```
### Backtrace
Not yet collected. The `get_device_name(0)` call segfaults - can provide gdb backtrace if needed.
---
## Reproducer Information
### Source Code / Reproducer
```python
import torch
import intel_extension_for_pytorch
x = torch.randn(10, 10).to("xpu")
y = x @ x.T # RuntimeError: could not create an engine
```
### Command Line / Application Details
Run the above Python script with PyTorch 2.6.0+xpu and Intel oneAPI 2026.1.0 environment sourced.
---
## Additional Information
### oneAPI Version
```
oneAPI DPC++ 2026.1.0-235
```
### Additional Notes
- **Investigation performed:**
- `strings libsycl.so.8 | grep bmg` → `intel_gpu_bmg_g21`, `intel_gpu_bmg_g31` — SYCL knows about BMG
- `strings /usr/local/lib/libigc.so.2 | grep Xe2` → `AllowSIMD16DropForXE2Plus`, `LscInstructionXe2` — IGC has Xe2 code
- oneAPI 2026.1 `device_architecture.def` lists BMG G21 and G31
- **Combinations tried:**
- torch 2.6.0+pip + SYCL 2025.0.2 → this error (`could not create an engine`)
- torch 2.6.0+conda + SYCL 2025.3.2 → "device architecture not supported"
- torch 2.8.0+oneAPI + SYCL 9 → ABI mismatch
- **Suspected root cause:** The Level Zero → IGC kernel compilation path may not correctly map the Battlemage G21 PCI ID (8086:b080) to the Xe2 compilation target, despite both SYCL and IGC having the necessary definitions.
- Related to prior issue #947 (submitted without template)
Please investigate whether the kernel compilation path correctly handles the Battlemage G21 PCI ID. Happy to provide any additional logs or run further diagnostics.
Contributor guide
Research direction
Start by running the supplied PyTorch reproducer and confirm that element-wise operations work while matrix multiplication fails and get_device_name(0) segfaults. Compare the Battlemage entries in device_architecture.def with the PCI ID 8086:b080 through the Level Zero/IGC path; done means matrix multiplication and device-name lookup work without errors or a segfault.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux, python, pytorch, ubuntu
- Domain
- computer-graphics, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100