Several of one GPU: <gpu>/<model>/<N>x-<engine>-<profile>.md with gpus, tp and pp (tp × pp = gpus) and a declared PCIe topology. Different GPUs: mixed/<setup>/, named after its cards, with the same layout as a GPU folder and a generated mixed/README.md. Runs must sit in their recipe's setup folder. Energy, and bandwidth for pipeline parallel or mixed, are left out where bench-standard measures one GPU only; docs/ bench-standard-gaps.md lists those gaps for the benchmarks repo. The wanted lists take the fewest of one GPU a model fits in. Demo: 2x Arc B580 with vLLM TP 2 and llama.cpp layer split for Qwen3.8-27B, -sm row as what lost, and Arc Pro B60 + Arc B580 mixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
753bdadf7a
commit
976a8b40e5
59 files changed
+39381
-119
No files matched your search
@@ -74,7 +74,7 @@ def test_verified_needs_two_submitters():
|
||||
def repo(tmp_path):
|
||||
root = tmp_path / "cookbook"
|
||||
shutil.copytree(cookbook.ROOT, root, ignore=shutil.ignore_patterns(".git", "__pycache__", "*.html"))
|
||||
for d in root.glob("*/results/*"): # validate only needs the reports to exist
|
||||
for d in [*root.glob("*/results/*"), *root.glob("mixed/*/results/*")]: # only the reports' existence matters
|
||||
if d.is_dir():
|
||||
(d / f"{d.name}.html").touch()
|
||||
return root
|
||||
@@ -145,3 +145,51 @@ def test_result_must_sit_in_its_gpu_folder(repo):
|
||||
def test_stray_top_level_folder_warns(repo):
|
||||
(repo / "arc-b999").mkdir()
|
||||
assert any("arc-b999: not a GPU" in w for w in cookbook.Cookbook(repo).warnings)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------- multi-GPU and mixed
|
||||
MULTI = "arc-b580/qwen3.8-27b/2x-vllm-single-user.md"
|
||||
MIXED = "mixed/1x-arc-b580_1x-arc-pro-b60/qwen3.8-27b/llama.cpp-single-user.md"
|
||||
|
||||
|
||||
def test_setup_names_folders_like_bench_sh_names_gpus():
|
||||
assert cookbook.setup("Arc B580", 2) == ("arc-b580", "Arc B580", "2× Arc B580")
|
||||
assert cookbook.setup(["Arc Pro B60", "Arc B580"]) == \
|
||||
("mixed/1x-arc-b580_1x-arc-pro-b60", "Arc B580+Arc Pro B60", "Arc B580 + Arc Pro B60")
|
||||
|
||||
|
||||
def test_multi_gpu_needs_topology(repo):
|
||||
edit(repo / MULTI, 'topology = ["Gen4 x8 CPU", "Gen4 x8 CPU"]\n', "")
|
||||
assert "declare topology" in errors(repo)
|
||||
|
||||
|
||||
def test_tp_times_pp_is_the_gpu_count(repo):
|
||||
edit(repo / MULTI, "tp = 2\n", "")
|
||||
assert "tp × pp is 1, but the recipe runs on 2 GPUs" in errors(repo)
|
||||
|
||||
|
||||
def test_gpu_count_is_in_the_file_name(repo):
|
||||
shutil.move(repo / MULTI, repo / "arc-b580/qwen3.8-27b/vllm-single-user.md")
|
||||
assert "should be arc-b580/qwen3.8-27b/2x-vllm-single-user.md" in errors(repo)
|
||||
|
||||
|
||||
def test_mixed_needs_different_gpus(repo):
|
||||
edit(repo / MIXED, 'gpu = ["Arc Pro B60", "Arc B580"]', 'gpu = ["Arc B580", "Arc B580"]')
|
||||
assert "a mixed setup needs two different GPUs" in errors(repo)
|
||||
|
||||
|
||||
def test_mixed_run_must_be_in_its_setup_folder(repo):
|
||||
run = "261028_demo_qwen3.8-27b_llama.cpp_2x-arc-b580-arc-pro-b60"
|
||||
src = repo / "mixed/1x-arc-b580_1x-arc-pro-b60/results" / run
|
||||
dst = repo / "mixed/1x-arc-a770_1x-arc-b580/results"
|
||||
dst.mkdir(parents=True)
|
||||
shutil.move(src, dst / run)
|
||||
assert f"{run} is in mixed/1x-arc-a770_1x-arc-b580/results, not mixed/1x-arc-b580_1x-arc-pro-b60/results" \
|
||||
in errors(repo)
|
||||
|
||||
|
||||
def test_wanted_takes_the_fewest_gpus_that_fit():
|
||||
wanted = cookbook.Cookbook().wanted()
|
||||
assert ("Arc A770", 2, "Qwen3.8-27B") in wanted
|
||||
assert not any(g == "Arc B580" and m == "Qwen3.8-27B" for g, _, m in wanted) # has a 2× recipe
|
||||
assert not any(g == "Arc B570" and m == "Qwen3.8-27B" for g, _, m in wanted) # 2 × 10 GB is too small
|
||||
Reference in new issue
Block a user