Commit 1f3ae1f
authored
Use GUID_DEVCLASS_COMPUTEACCELERATOR for NPU discovery (microsoft#24660)
### Description
Updated device discovery to use `GUID_DEVCLASS_COMPUTEACCELERATOR`
instead of `GUID_DEVCLASS_SYSTEM` when querying SetupAPI for potential
NPU devices. This provides a more specific and accurate class for
identifying compute accelerators like NPUs.
This change also saves us an average of 5 milliseconds by not looping
through unnecessary system devices.
### Motivation and Context
When looking for NPUs, the previous code used `GUID_DEVCLASS_SYSTEM` as
the class to query for potential devices and didn't return the Qualcomm
NPU.1 parent dc09448 commit 1f3ae1f
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | | - | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| |||
183 | 184 | | |
184 | 185 | | |
185 | 186 | | |
186 | | - | |
| 187 | + | |
187 | 188 | | |
188 | | - | |
| 189 | + | |
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
| |||
0 commit comments