Trace runner (run_v3_trace.sh) + concurrent mb7 correctness test
This commit is contained in:
@@ -193,6 +193,29 @@ async def main_async(a):
|
||||
print(f"[mb7] busy: A_run={na} B_run={nb}")
|
||||
break
|
||||
|
||||
# --- concurrent correctness mode: fire N transfers at once ----------
|
||||
if a.concurrent > 1 and a.mode == "layerwise":
|
||||
print(f"[mb7] CONCURRENT correctness: {a.concurrent} simultaneous "
|
||||
f"transfers per size (src=A stresses concurrent producing)")
|
||||
all_ok = True
|
||||
for sz in sizes:
|
||||
tasks = [
|
||||
asyncio.create_task(measure_layerwise(
|
||||
client, A, B, src_eid, src_bp_addr,
|
||||
synth_prompt(sz * 1000 + j, sz), sz * 1000 + j))
|
||||
for j in range(a.concurrent)
|
||||
]
|
||||
rows = await asyncio.gather(*tasks)
|
||||
oks = [r["cached"] >= int(sz * 0.9) for r in rows]
|
||||
all_ok = all_ok and all(oks)
|
||||
print(f" sz={sz:>6} x{a.concurrent}: cached="
|
||||
f"{[r['cached'] for r in rows]} correct={oks}")
|
||||
print(f"[mb7] CONCURRENT correctness: "
|
||||
f"{'ALL PASS' if all_ok else 'FAILURE'}")
|
||||
if loader:
|
||||
await loader.stop()
|
||||
return
|
||||
|
||||
results = []
|
||||
for sz in sizes:
|
||||
for rep in range(a.repeats):
|
||||
@@ -259,6 +282,9 @@ def main():
|
||||
p.add_argument("--repeats", type=int, default=3)
|
||||
p.add_argument("--bg-load", type=int, default=0,
|
||||
help="N concurrent background decode streams across A+B")
|
||||
p.add_argument("--concurrent", type=int, default=1,
|
||||
help="layerwise: fire N simultaneous transfers to test "
|
||||
"concurrent-producing correctness")
|
||||
p.add_argument("--out", default="mb7_result.json")
|
||||
args = p.parse_args()
|
||||
asyncio.run(main_async(args))
|
||||
|
||||
Reference in New Issue
Block a user