Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The registry parser can read beyond its buffer when string data lacks a NUL terminator.
1 open finding
What changed in this PR
Classifies Windows compute-accelerator drivers as GPU or NPU for correct loader initialization.
Changes:
- Reads DXCore hardware-type attributes.
- Falls back to DLL filename tokens, then legacy NPU behavior.
| File | Description |
|---|---|
source/loader/windows/driver_discovery_win.cpp |
Adds Windows compute-driver type detection. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
7b854f1 to
99913d5
Compare
Drivers under GUID_DEVCLASS_COMPUTEACCELERATOR were always typed NPU, so GPU-only init never loaded an MCDM (compute-only) GPU driver. Type them from the device's DXCoreAttributes hardware-type GUID (GPU or NPU). If absent, fall back to a delimited npu/vpu/gpu token in the DLL file name. Otherwise keep the legacy NPU default for older NPU drivers.
Find each entry's terminator with memchr within the returned data size and treat an unterminated entry as invalid, instead of relying on strlen.
Skip a zero-length value, use only the bytes the second query returns, and cut the path at the first NUL. An unterminated value is still accepted. The stored path no longer keeps the trailing NUL from the registry.
Load a driver once when it serves both device classes. Load MIXED drivers for GPU and NPU init requests. Signed-off-by: Russell McGuire <russell.w.mcguire@intel.com>
99913d5 to
48da8d9
Compare
Signed-off-by: Russell McGuire <russell.w.mcguire@intel.com>
Level Zero loader ABI checklast-release ( master ( If an ABI change is intended, a reviewer with write access can accept it: leave an approval review on the PR head commit with the keyword |
There was a problem hiding this comment.
🔵 Needs a closer look
DXCoreAttributes registry discovery, GPU/NPU classification, and cross-class DLL merging require Windows validation; the added tests cover only driver initialization and are excluded on Windows.
No open issues 🎉
1 resolved since last review
Review effort: Balanced

Drivers under GUID_DEVCLASS_COMPUTEACCELERATOR were always typed NPU, so GPU-only init never loaded an MCDM (compute-only) GPU driver. Type them from the device's DXCoreAttributes hardware-type GUID (GPU or NPU). If absent, fall back to a delimited npu/vpu/gpu token in the DLL file name. Otherwise keep the legacy NPU default for older NPU drivers.