Skip to content

Commit 9ba3982

Browse files
authored
[Test] Consolidate paged kernel tests into deterministic golden test (#167)
`test_metal_kernel_paged.py` re-implements vllm-metal internals (cache setup, prefill/decode orchestration, context management) to compare two paths. This scaffolding introduces additional complexity, making failures hard to attribute. Delete it and add its prompts to `test_paged_deterministic.py`, which does the same comparison end-to-end through the real vLLM stack against golden tokens. Related: #158 #149 #119 --------- Signed-off-by: ran <hzz5361@psu.edu>
1 parent 2e4be07 commit 9ba3982

3 files changed

Lines changed: 4 additions & 338 deletions

File tree

tests/test_metal_kernel_paged.py

Lines changed: 0 additions & 338 deletions
This file was deleted.

tests/test_paged_deterministic.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"One plus one equals",
4747
"The largest planet in our solar system is",
4848
"Water boils at a temperature of",
49+
"Machine learning is",
4950
]
5051

5152
# fmt: off
@@ -57,6 +58,7 @@
5758
"One plus one equals": [825, 11, 825, 5519, 825, 16819, 1378, 13, 2055, 11],
5859
"The largest planet in our solar system is": [1112, 30, 362, 13, 43562, 425, 13, 48976, 356, 13],
5960
"Water boils at a temperature of": [220, 16, 15, 15, 30937, 13, 3555, 374, 279, 9315],
61+
"Machine learning is": [264, 7988, 5392, 429, 702, 13791, 1506, 279, 2070, 315],
6062
}
6163

6264
# Golden token IDs from paged KV cache (HF kernel on main branch), greedy decoding.
@@ -68,6 +70,7 @@
6870
"One plus one equals": [825, 11, 825, 5519, 825, 16819, 1378, 13, 2055, 11],
6971
"The largest planet in our solar system is": [1112, 30, 362, 13, 43562, 425, 13, 48976, 356, 13],
7072
"Water boils at a temperature of": [220, 16, 15, 15, 30937, 13, 3555, 374, 279, 9315],
73+
"Machine learning is": [264, 7988, 5392, 429, 702, 13791, 1506, 279, 2070, 315],
7174
}
7275
# fmt: on
7376

tools/gen_golden_token_ids_for_deterministics.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"One plus one equals",
3333
"The largest planet in our solar system is",
3434
"Water boils at a temperature of",
35+
"Machine learning is",
3536
]
3637

3738
if __name__ == "__main__":

0 commit comments

Comments
 (0)