diff --git a/tools/par/sweep.py b/tools/par/sweep.py index 84372967..fad36d0e 100644 --- a/tools/par/sweep.py +++ b/tools/par/sweep.py @@ -16,6 +16,7 @@ ap.add_argument("--repo", default=None) ap.add_argument("--out", required=True) ap.add_argument("--rounds", default="2") ap.add_argument("--default-work", default="w1;w2:4,8@--max-tokens 128") +ap.add_argument("--exe-base", default=None) a = ap.parse_args() repo = a.repo or a.root + "/main" here = os.path.dirname(os.path.abspath(__file__)) @@ -23,8 +24,8 @@ for line in open(a.variants): line = line.strip() if not line or line.startswith("#"): continue - f = [x.strip() for x in line.split("|")] + [""] * 7 - tag, gpus, par, groups, env, extra, work = f[:7] + f = [x.strip() for x in line.split("|")] + [""] * 8 + tag, gpus, par, groups, env, extra, work, srv = f[:8] cmd = [sys.executable, f"{here}/../par_run.py", "--box", a.box, "--tag", tag, "--exe", a.exe, "--repo", repo, "--gpus", gpus or "0,1", "--out", a.out, "--rounds", a.rounds, "--work", work or a.default_work] if par: @@ -35,6 +36,8 @@ for line in open(a.variants): cmd += ["--env", env] if extra: cmd += ["--extra", extra] + if srv: + cmd += ["--server-extra", srv] r = subprocess.run(cmd, capture_output=True, text=True) out = [l for l in r.stdout.splitlines() if l.startswith(("w1 ", "w2 ", "w4 ", "w6 ", "SERVER", "ABORT", "DONE", "[", "par_load"))] print(f"## {tag}: rc={r.returncode}", flush=True) diff --git a/tools/par/variants/stack_b1.txt b/tools/par/variants/stack_b1.txt new file mode 100644 index 00000000..f009c0e9 --- /dev/null +++ b/tools/par/variants/stack_b1.txt @@ -0,0 +1 @@ +st_b1 | 0,1 | 8 | | | | w1;w2:4,8,16@--nonce st --max-tokens 256 --rounds 2;w2:16,8,4@--nonce st --max-tokens 128 --rounds 2 diff --git a/tools/par/variants/stack_s0.txt b/tools/par/variants/stack_s0.txt new file mode 100644 index 00000000..29aa9b48 --- /dev/null +++ b/tools/par/variants/stack_s0.txt @@ -0,0 +1 @@ +st_ls | 0,1 | 8 | | STRATA_CKPT_POOL=1;STRATA_CKPT_POOL_READY=4;STRATA_CKPT_THREADS=1;STRATA_SLOT_CKPT_MOVE=1;STRATA_SLOT_COPY_DIRECT=1;STRATA_SLOT_COPY_BATCHSYNC=1;STRATA_BATCH_GDN_GROUPS=1;STRATA_BATCH_ATTN_ROWS=1;STRATA_BATCH_SELF_COMMIT=1;STRATA_COALESCE_PREFILL=8;STRATA_COALESCE_MIN_REQS=3;STRATA_COALESCE_WAIT_MS=60 | | w1;w2:4,8,16@--nonce st --max-tokens 256 --rounds 2;w2:16,8,4@--nonce st --max-tokens 128 --rounds 2 diff --git a/tools/par/variants/stack_s1.txt b/tools/par/variants/stack_s1.txt new file mode 100644 index 00000000..685f6dcd --- /dev/null +++ b/tools/par/variants/stack_s1.txt @@ -0,0 +1,2 @@ +st_rep | 0,1 | 8 | | STRATA_CKPT_POOL=1;STRATA_CKPT_POOL_READY=4;STRATA_CKPT_THREADS=1;STRATA_SLOT_CKPT_MOVE=1;STRATA_SLOT_COPY_DIRECT=1;STRATA_SLOT_COPY_BATCHSYNC=1;STRATA_BATCH_GDN_GROUPS=1;STRATA_BATCH_ATTN_ROWS=1;STRATA_BATCH_SELF_COMMIT=1;STRATA_COALESCE_PREFILL=8;STRATA_COALESCE_MIN_REQS=3;STRATA_COALESCE_WAIT_MS=60;STRATA_REPLICA_SHARED_ARENA=1 | | w1;w2:4,8,16@--nonce st --max-tokens 256 --rounds 2;w2:16,8,4@--nonce st --max-tokens 128 --rounds 2 | --replicas 2 +st_repw | 0,1 | 8 | | STRATA_CKPT_POOL=1;STRATA_CKPT_POOL_READY=4;STRATA_CKPT_THREADS=1;STRATA_SLOT_CKPT_MOVE=1;STRATA_SLOT_COPY_DIRECT=1;STRATA_SLOT_COPY_BATCHSYNC=1;STRATA_BATCH_GDN_GROUPS=1;STRATA_BATCH_ATTN_ROWS=1;STRATA_BATCH_SELF_COMMIT=1;STRATA_COALESCE_PREFILL=8;STRATA_COALESCE_MIN_REQS=3;STRATA_COALESCE_WAIT_MS=60;STRATA_REPLICA_SHARED_ARENA=1;STRATA_PF_W16_CACHE_MIB=2048 | | w1;w2:4,8,16@--nonce st --max-tokens 256 --rounds 2;w2:16,8,4@--nonce st --max-tokens 128 --rounds 2 | --replicas 2