Skip to content

Commit 8a73a20

Browse files
committed
Update
1 parent 04b29c8 commit 8a73a20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bench/bench/bench_mlp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@ def bench_mlp(batch, dim1, dim2, n_expts_tot, n_expts_act, x_dtype, w_dtype,
9696
# -- analyze --
9797
gf, inclusive_metrics, exclusive_metrics, device_info = viewer.read(fpath)
9898
# Now the dataframe only contains leave nodes (i.e., kernels) that perform matmuls
99-
matmuls = gf.dataframe[gf.dataframe["name"].str.contains("matmul") & gf.dataframe["device_id"].notna()]
99+
matmuls = gf.filter("MATCH ('*', c) WHERE c.'name' =~ '.*matmul.*' AND c IS LEAF").dataframe
100100
tot_bytes = matmuls["bytes"].sum()
101101
tot_flops = sum(matmuls[[c for c in ['flops8', 'flops16'] if c in matmuls.columns]].sum())
102102
tot_time = matmuls["time (ns)"].sum()
103103

104-
# Calculate theoretical min time based on hardware limits
104+
# Calculate theoretical min time based on hardware limits.
105105
device_type = matmuls["device_type"].iloc[0]
106106
device_id = matmuls["device_id"].iloc[0]
107107
info = device_info[device_type][device_id]

0 commit comments

Comments
 (0)