ml-energy / zeus

Deep Learning Energy Measurement and Optimization
https://ml.energy/zeus
Apache License 2.0
179 stars 24 forks source link

RAPL energy reading wrap around. #91

Open wbjin opened 3 weeks ago

wbjin commented 3 weeks ago

Is your feature request related to a problem? Please describe. Currently, there is no way to handle when measurements exceed max_energy_range_uj for RAPL multiple times. Consider the scenario where start_window measures the energy consumption at 60J. The energy consumption reading in the energy_uj files could exceed max_energy_range_uj and wrap around however many times and there would be no way to get the correct measurement when that happens.

Describe the solution you'd like Readings of the energy_uj file can be made periodically and the number of times self.last_enrergy is less than the reading from the energy_uj file can be recorded.