35 lines
960 B
Python
35 lines
960 B
Python
import unittest
|
|
|
|
from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci
|
|
from sglang.test.test_utils import (
|
|
DEFAULT_MODEL_NAME_FOR_TEST,
|
|
CustomTestCase,
|
|
run_bench_serving,
|
|
run_mmlu_test,
|
|
)
|
|
|
|
register_cuda_ci(est_time=108, suite="stage-b-test-large-1-gpu")
|
|
register_amd_ci(est_time=108, suite="stage-b-test-small-1-gpu-amd")
|
|
|
|
|
|
class TestNoChunkedPrefill(CustomTestCase):
|
|
|
|
def test_no_chunked_prefill(self):
|
|
run_mmlu_test(
|
|
disable_radix_cache=False, enable_mixed_chunk=False, chunked_prefill_size=-1
|
|
)
|
|
|
|
def test_no_chunked_prefill_without_radix_cache(self):
|
|
res = run_bench_serving(
|
|
model=DEFAULT_MODEL_NAME_FOR_TEST,
|
|
num_prompts=10,
|
|
request_rate=float("inf"),
|
|
other_server_args=["--disable-radix-cache", "--chunked-prefill-size", "-1"],
|
|
)
|
|
|
|
assert res["completed"] == 10
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|