Hello,
Welcome to Microsoft Q&A!
It gets the perf counter data, and get perf counter then using the physical ID to classify the running time data and do the math. Here is a sample: https://gist.github.com/fecf/2103a82afc76b5c88829c4383944a5aa
Digging a little deeper, the adapter for the NPU engine here is taken via the DXCore enumeration adapter and then collected and displayed by creating a query and adding counters to it.
https://learn.microsoft.com/en-us/windows/win32/dxcore/dxcore-enum-adapters
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.