Freeze long-context Frontier profile

This commit is contained in:
2026-07-17 10:30:37 +08:00
parent b6ef6eeae7
commit 10afe4e2e8
7 changed files with 1372 additions and 3 deletions

View File

@@ -644,16 +644,51 @@ def main() -> None:
args.output / "allreduce.json",
]
batch_composition_augmented = len(args.attention) > 3
long_context_augmented = any(
"long-context" in path.name for path in args.attention
)
long_context_coverage: dict[str, Any] = {"included": long_context_augmented}
if long_context_augmented:
with (args.output / "attention.csv").open(newline="") as handle:
frozen_attention = list(csv.DictReader(handle))
by_tp = {}
for tp in (1, 2, 4):
decode_kv = {
int(float(row["kv_cache_size"]))
for row in frozen_attention
if int(row["num_tensor_parallel_workers"]) == tp
and row["is_prefill"].lower() == "false"
}
mixed_kv = {
int(float(row["decode_avg_kv_cache_size"]))
for row in frozen_attention
if int(row["num_tensor_parallel_workers"]) == tp
and row.get("is_true_mixed_batch", "").lower() == "true"
}
if not {16384, 32768, 40960}.issubset(decode_kv):
raise ValueError(f"long-context decode coverage mismatch for TP{tp}")
if not {16384, 32768}.issubset(mixed_kv):
raise ValueError(f"long-context mixed coverage mismatch for TP{tp}")
by_tp[str(tp)] = {
"decode_kv_lengths": sorted(decode_kv),
"true_mixed_decode_avg_kv_lengths": sorted(mixed_kv),
}
long_context_coverage["by_tp"] = by_tp
manifest = {
"schema_version": (
"frontier_qwen30_vllm020_frozen_profile.v3"
if batch_composition_augmented
else "frontier_qwen30_vllm020_frozen_profile.v2"
"frontier_qwen30_vllm020_frozen_profile.v4"
if long_context_augmented
else (
"frontier_qwen30_vllm020_frozen_profile.v3"
if batch_composition_augmented
else "frontier_qwen30_vllm020_frozen_profile.v2"
)
),
"profile_id": (
"qwen3-30b-a3b-bf16-vllm020-h20-tp1-2-4-"
"fused-mixed-total-conserving"
+ ("-pure-prefill-batch-composition" if batch_composition_augmented else "")
+ ("-long-context-decode-mixed" if long_context_augmented else "")
),
"environment_contract": {
"hardware": "NVIDIA H20",
@@ -672,6 +707,7 @@ def main() -> None:
"allreduce": allreduce_rows,
},
"attention_tp_coverage": attention_tps,
"attention_long_context_coverage": long_context_coverage,
"projection_contract": {
"linear": "Frontier profiler using vLLM 0.20 CUDA operators",
"attention": (
@@ -692,6 +728,13 @@ def main() -> None:
if batch_composition_augmented
else "not included"
),
"attention_long_context": (
"Direct FA3 measurements at decode KV lengths 16K/32K/40K, "
"plus true-mixed prefill/decode measurements at 16K/32K, "
"for TP1/2/4"
if long_context_augmented
else "not included"
),
"moe": (
"Replicated gate and fused top-k plus TP-local modular expert kernel; "
"expert measurement already includes prepare/finalize so shuffling is zero"