2024-10-16 01:33:20 -07:00
|
|
|
"""
|
|
|
|
|
Usage:
|
2024-10-24 21:23:09 -07:00
|
|
|
python3 -m unittest test_overlap_schedule.TestOverlapSchedule.test_radix_attention_chunked_prefill
|
|
|
|
|
python3 test_overlap_schedule.py
|
2024-10-16 01:33:20 -07:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
import unittest
|
|
|
|
|
|
2024-10-24 21:23:09 -07:00
|
|
|
from sglang.test.test_utils import run_mmlu_test
|
2024-10-16 01:33:20 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class TestOverlapSchedule(unittest.TestCase):
|
|
|
|
|
def test_no_radix_attention_chunked_prefill(self):
|
2024-10-24 21:23:09 -07:00
|
|
|
run_mmlu_test(disable_radix_cache=True, chunked_prefill_size=32)
|
2024-10-16 01:33:20 -07:00
|
|
|
|
|
|
|
|
def test_no_radix_attention_no_chunked_prefill(self):
|
2024-10-24 21:23:09 -07:00
|
|
|
run_mmlu_test(disable_radix_cache=True, chunked_prefill_size=-1)
|
2024-10-16 01:33:20 -07:00
|
|
|
|
|
|
|
|
def test_radix_attention_chunked_prefill(self):
|
2024-10-24 21:23:09 -07:00
|
|
|
run_mmlu_test(disable_radix_cache=False, chunked_prefill_size=32)
|
2024-10-16 01:33:20 -07:00
|
|
|
|
|
|
|
|
def test_radix_attention_no_chunked_prefill(self):
|
2024-10-24 21:23:09 -07:00
|
|
|
run_mmlu_test(disable_radix_cache=False, chunked_prefill_size=-1)
|
2024-10-16 01:33:20 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
unittest.main()
|