in Benchmarks/NVIDIA/HBMBandwidth.py [0:0]
def save_results(self):
copy = ["Copy"]
mul = ["Mul"]
add = ["Add"]
triad = ["Triad"]
dot = ["Dot"]
for log in self.buffer:
copy.append(float(log[0][1]))
mul.append(float(log[1][1]))
add.append(float(log[2][1]))
triad.append(float(log[3][1]))
dot.append(float(log[4][1]))
copy[1:] = self.process_stats(copy[1:])
mul[1:] = self.process_stats(mul[1:])
add[1:] = self.process_stats(add[1:])
triad[1:] = self.process_stats(triad[1:])
dot[1:] = self.process_stats(dot[1:])
table1 = PrettyTable()
table1.field_names = ["Operation","Min (TB/s)", "Max (TB/s)", "Mean (TB/s)"]
table1.add_row(copy)
table1.add_row(mul)
table1.add_row(add)
table1.add_row(triad)
table1.add_row(dot)
print(table1)
with open('../../Outputs/HBMBandwidth_Performance_results_' + self.machine_name +'.csv', 'w') as csvFile:
writer = csv.writer(csvFile, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL)
writer.writerow(["Operation","Min (TB/s)", "Max (TB/s)", "Mean (TB/s)"])
writer.writerow(copy)
writer.writerow(mul)
writer.writerow(add)
writer.writerow(triad)
writer.writerow(dot)