in Benchmarks/AMD/HBMBandwidth.py [0:0]
def run(self):
print("Running HBM Bandwidth...")
runs_executed = 0
buffer = []
while runs_executed < self.num_runs:
run_cmd = "sudo " + self.dir_path + "/BabelStream/build/hip-stream"
results = subprocess.run(run_cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
tools.write_log(tools.check_error(results))
log = results.stdout.decode("utf-8").strip().split("\n")[13:18]
for i in range(len(log)):
temp = log[i].split()
log[i] = [temp[0], temp[1]]
buffer.append(log)
runs_executed += 1
time.sleep(int(self.interval))
self.buffer = buffer
self.save_results()