| 185 | } |
| 186 | |
| 187 | std::string identify_npu_arch() { |
| 188 | wmi::WMIConnection wmi_conn; |
| 189 | if (!wmi_conn.is_valid()) { |
| 190 | return ""; |
| 191 | } |
| 192 | |
| 193 | // XDNA2 NPU: AMD vendor 1022, device 17F0 |
| 194 | bool found_xdna2 = false; |
| 195 | wmi_conn.query( |
| 196 | L"SELECT PNPDeviceID FROM Win32_PnPEntity WHERE PNPDeviceID LIKE '%VEN_1022&DEV_17F0%'", |
| 197 | [&found_xdna2](IWbemClassObject* pObj) { |
| 198 | found_xdna2 = true; |
| 199 | }); |
| 200 | |
| 201 | if (found_xdna2) { |
| 202 | return "XDNA2"; |
| 203 | } |
| 204 | return ""; |
| 205 | } |
| 206 | |
| 207 | #endif |
| 208 |
no test coverage detected