Skip to content

Studio: detect Windows Intel GPUs via the registry before WMI - #7064

Merged
oobabooga merged 3 commits into
unslothai:mainfrom
oobabooga:intel-vulkan-registry-probe
Jul 10, 2026
Merged

oobabooga merged 3 commits into
unslothai:mainfrom
oobabooga:intel-vulkan-registry-probe

Conversation

@oobabooga

@oobabooga oobabooga commented Jul 10, 2026 •

Copy link
Copy Markdown
Member

The first real Intel tester of #5819 (Arc A770, Windows 11, in #4452) still got CPU inference: the installer never detected his GPU and picked the CPU bundle.

Closes #4452

Problem

Windows Intel detection is a PowerShell WMI query with a 15s timeout, and any failure is silently swallowed. A cold PowerShell start can blow that budget on real machines (slow antivirus, degraded WMI). When it does, the host gets the CPU build with nothing in the logs to show why.

Fix

Check the registry for an Intel display adapter first (the same vendor-id test the Linux path does via sysfs), falling back to WMI only when the registry shows no Intel entry. The registry read is in-process and instant. Hosts detected today behave the same; hosts the WMI probe was missing now get Vulkan.

Verification

Confirmed by the reporter on his 2x Arc A770 machine (comment): this branch detected the GPUs, replaced his CPU install with the Vulkan prebuilt, and ran inference on the GPU. Also covered by tests, from the registry walk (through a fake registry) to detect_host() ordering: registry hit means no PowerShell spawn, registry miss fires the WMI fallback.

@oobabooga
oobabooga requested a review from danielhanchen as a code owner July 10, 2026 15:53

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces an in-process Windows registry check to detect Intel GPUs, avoiding slow PowerShell subprocesses, with a fallback to the CIM query if the registry check fails. It also adds comprehensive unit tests using a mocked registry. The feedback suggests catching all exceptions (except Exception) instead of just OSError in the outer try-except block of the registry check to ensure that unexpected errors in this non-critical path do not disrupt the installer.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread studio/install_llama_prebuilt.py Resolved
@oobabooga
oobabooga merged commit d105bd7 into unslothai:main Jul 10, 2026
42 checks passed
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.

[Question] Unsloth Studio: When would you add INTEL and AMD support to the new webui?

1 participant