Fixed bug in peak memory stats + added unit test
This commit is contained in:
@@ -64,13 +64,13 @@ class Stats:
|
||||
match = self.re_cycles_memory.match(line)
|
||||
if match:
|
||||
mem = util.humanReadableSizeToMegabytes(match.group(1))
|
||||
peak = util.humanReadableSizeToMegabytes(match.group(1))
|
||||
peak = util.humanReadableSizeToMegabytes(match.group(2))
|
||||
if self.device_memory_usage == "N/A" or \
|
||||
mem > self.device_memory_usage:
|
||||
self.device_memory_usage = mem
|
||||
if self.device_peak_memory == "N/A" or \
|
||||
mem > self.device_peak_memory:
|
||||
self.device_peak_memory = mem
|
||||
peak > self.device_peak_memory:
|
||||
self.device_peak_memory = peak
|
||||
|
||||
def getCurrentProgress(self):
|
||||
if self.total_tiles == 0:
|
||||
|
Reference in New Issue
Block a user