Skip to content

xpu: Qwen 3.8-27B opens Arc Pro B60 through device detection - #4802

Merged
ashhart merged 7 commits into
mainfrom
lead/xpu-q27-device-id
Nov 24, 2026
Merged

ashhart merged 7 commits into
mainfrom
lead/xpu-q27-device-id

Conversation

@ashhart

@ashhart ashhart commented Nov 23, 2026

Copy link
Copy Markdown
Owner

Qwen 3.8-27B on XPU opened cards with a hard-coded B70 PCI id, so an Arc Pro B60 failed at load with NoDevice.

This keeps an explicit override and the B70 default, and falls back to device detection only when the default finds no card. A mixed system therefore keeps its working B70 peers. Flash Next is unchanged.

Host tests cover the mixed-card case and the fallback errors. It has not been run on Arc hardware here.

Refs #4778.

Issue #4778: the hard-coded B70 ID refused Arc Pro B60 before any kernel ran. Share Flash Next detection with Qwen27 and tp_bench; XPU_DEVICE_ID still overrides discovery. The fake-opener host contract covers 0xe211 and 0xe223 without a device.
…evice-id tests

qwen27.zig and flashnext/xpu_store.zig now import device_id, but hostTests()
gave it only to the device-id test, so test-draft-xpu-host and
test-slide-xpu-host could not compile (no module named 'device_id' within
'xpu_qwen27' / 'flashnext_xpu'). The host device_id module (on ze) is built
once, before both host modules, and all three use it.
detectDeviceId opens Level Zero's libze_loader.so.1 with std.DynLib, which
std does not provide for Windows, so test-xpu-device-id-host could not compile
there ("unsupported platform"). After the XPU_DEVICE_ID override, a non-Linux
build now returns error.LoaderUnavailable, the error a Linux host without the
loader already gets. The check is comptime: Linux compiles exactly as before.
tail_test.zig, means_test.zig, seam_test.zig and close_test.zig import
qwen27.zig, which now imports device_id, so compile-xpu-qwen27-tail-host,
compile-xpu-qwen27-tail-linux and xpu-qwen27-tests failed the same way
(no module named 'device_id' within 'root'). The host check takes the host
device_id module, the Linux cross-compile its own on ze_linux, and the device
tests the engine's device_id_mod.
@ashhart
ashhart force-pushed the lead/xpu-q27-device-id branch from 0631d7b to 6b9c699 Compare November 24, 2026 20:45
@ashhart
ashhart merged commit a0fe348 into main Nov 24, 2026
@ashhart
ashhart deleted the lead/xpu-q27-device-id branch November 24, 2026 20:45
ashhart added a commit that referenced this pull request Nov 24, 2026
ashhart added a commit that referenced this pull request Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant