Bigger dimensions
This commit is contained in:
36
run_microbenchmarks.py
Normal file
36
run_microbenchmarks.py
Normal file
@@ -0,0 +1,36 @@
|
||||
import dataclasses
|
||||
import json
|
||||
import polars as pl
|
||||
import subprocess
|
||||
|
||||
from config import Configuration, Statistics
|
||||
|
||||
workloads = [
|
||||
"vadd",
|
||||
"vmul",
|
||||
"haxpy",
|
||||
"gemv",
|
||||
"gemv_layers"
|
||||
]
|
||||
|
||||
levels = ["X1", "X2", "X3", "X4"]
|
||||
|
||||
results: list[dict] = []
|
||||
|
||||
for workload in workloads:
|
||||
for level in levels:
|
||||
config = Configuration(workload, level)
|
||||
serialized_config = json.dumps(dataclasses.asdict(config))
|
||||
|
||||
out = subprocess.run(
|
||||
["python3", "benches.py", serialized_config], capture_output=True
|
||||
)
|
||||
|
||||
statistics = Statistics(**json.loads(out.stdout))
|
||||
|
||||
result = {"workload": workload, "level": level, "runtime": statistics.runtime}
|
||||
results.append(result)
|
||||
print(result)
|
||||
|
||||
df = pl.DataFrame(results)
|
||||
df.write_csv("rocm_results.csv")
|
||||
Reference in New Issue
Block a user