Commit 45d60148 authored by Maiterth, Matthias's avatar Maiterth, Matthias
Browse files

Using np.minimum and np.maximum to compute power_to_utilization.

This assumes that the minimum power is the actual minimum, according to
the input.
This may generate false values, if the system has the capability of turning
the GPUs in the system off (Assumed minimum when running is 75W, while
the the GPUs actually cosume 0 or 8W (standby)
This should report 0 regardless, but our remining calucluation should
account for this.

In the meantime this fixes the issue of negative utilization.
parent 9a5f9efc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -216,7 +216,7 @@ def power_to_utilization(power, pmin, pmax):
    float
        Utilization value.
    """
    return (power - pmin) / (pmax - pmin)
    return (np.maximum(pmin,power) - pmin) / (np.minimum(power,pmax) - pmin)


def create_binary_array_numpy(max_time, trace_quanta, util):