Opens a larger view. Escape closes it.

hardware-counters

verify.py

"""Independently verify the reviewer's three critical claims."""
import numpy as np, pandas as pd
D = "/work/project/project/user"
df = pd.read_csv(f"{D}/data/runs_expanded.csv")

print("=== C1: is the 1016 -> 815 drop really cset C lacking PAPI_TOT_CYC? ===")
print("rows total          :", len(df))
print("PAPI_TOT_CYC is NaN :", int(df.PAPI_TOT_CYC.isna().sum()))
print("  of which cset==C  :", int((df.PAPI_TOT_CYC.isna() & (df.cset == "C")).sum()))
d = df[df.PAPI_TOT_CYC.notna() & df.runtime_s.notna() & (df.runtime_s > 0)]
eta = (d.PAPI_TOT_CYC / 2.25e9) / d.runtime_s
print("after those drops   :", len(d))
print("eta max             : %.4f  -> filter eta<=1.5 removes %d rows"
      % (eta.max(), int((eta > 1.5).sum())))

print("\n=== C2: mean vs median of log10(eta) ===")
le = np.log10(eta)
print("mean   %.4f -> eta %.4f" % (le.mean(), 10**le.mean()))
print("median %.4f -> eta %.4f" % (le.median(), 10**le.median()))
print("predicting the MEAN mis-states runtime by %.1f%%"
      % (abs(10**le.mean()/10**le.median() - 1)*100))

print("\n=== C3: STREAM eta vs core count (claimed 0.23 GHz at 128) ===")
s = d[d.app == "stream"].assign(eta=eta[d.app == "stream"],
                                ghz=lambda x: x.PAPI_TOT_CYC/x.runtime_s/1e9)
print(s.pivot_table(index="ncore", columns="size", values="ghz",
                    aggfunc="median").round(2).to_string())
print("\nmin implied GHz anywhere in stream: %.2f" % s.ghz.min())

print("\n=== C4: feature availability per row (unmerged) ===")
feat_src = {"ipc": ["PAPI_TOT_INS","PAPI_TOT_CYC"],
            "l2_miss_per_instr": ["PAPI_L2_DCM","PAPI_TOT_INS"],
            "prefetch_l2_frac": ["L2_PREFETCH_HIT_L2","L2_PREFETCH_HIT_L3"],
            "l1_access_per_instr": ["PAPI_L1_DCA","PAPI_TOT_INS"],
            "arith_intensity": ["PAPI_FP_OPS","UNC_L3_CACHE_MISSES"]}
for f, cols in feat_src.items():
    have = d[cols].notna().all(axis=1).mean()*100
    print("  %-22s %5.1f%% of rows have all inputs" % (f, have))