You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wrote an explanation down below why current method is the correct one.
But really, you can ignore that, because I have a better reason.
Because Intel's engineers do like this in their gputop program. So I
just copied them, because they know better.
https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/blob/master/tools/gputop.c#L249
========================================================================
Currently xe load is calculated like this:
sum_of_all_deltas_cycles / sum_of_all_deltas_total_cycles
This is fine as long as you have on fd open. But if not, this will lead
to incorrect results.
Imagine this scenario:
fd1:
delta_cycles = 3152315
delta_total_cycles = 9611144
fd_load = 0.327985409 = 33%
fd2:
delta_cycles = 1132858
delta_total_cycles = 9607938
fd_load = 0.117908546 = 12%
Total load: 33 + 12 = 45%
If you calculated this the old way, you would get:
(3152315 / 1132858) / (9611144 / 9607938) = 0.2229645 = 22%
Co-authored-by: Ibrahim Ansari <ansari.ibrahim1@gmail.com>
0 commit comments