[CPU] use CustomTestCase for registered CPU tests (#38244)
This commit is contained in:
@@ -29,7 +29,7 @@ class TestBinding(CustomTestCase):
|
||||
self.assertEqual(bindings, expected_cores)
|
||||
|
||||
|
||||
class TestInitThreadsBinding(unittest.TestCase):
|
||||
class TestInitThreadsBinding(CustomTestCase):
|
||||
"""Tests for init_threads_binding: NUMA/core selection by global rank.
|
||||
|
||||
numa_index is the worker's global device id (gpu_id) across all DP
|
||||
|
||||
@@ -7,6 +7,7 @@ from sglang.srt.entrypoints.http_request_decompression import (
|
||||
RequestDecompressionMiddleware,
|
||||
)
|
||||
from sglang.test.ci.ci_register import register_cpu_ci
|
||||
from sglang.test.test_utils import CustomTestCase
|
||||
|
||||
register_cpu_ci(est_time=5, suite="stage-a-test-cpu-intel")
|
||||
|
||||
@@ -47,7 +48,7 @@ def _drive(scope, body_chunks):
|
||||
return (seen or None), sent
|
||||
|
||||
|
||||
class TestRequestDecompressionMiddleware(unittest.TestCase):
|
||||
class TestRequestDecompressionMiddleware(CustomTestCase):
|
||||
def test_passthrough_when_header_absent(self):
|
||||
scope = {"type": "http", "headers": [(b"content-length", b"4")]}
|
||||
seen, sent = _drive(scope, [(b"abcd", False)])
|
||||
|
||||
@@ -6,6 +6,7 @@ from starlette.datastructures import Headers
|
||||
|
||||
from sglang.srt.entrypoints.request_headers import apply_header_overrides
|
||||
from sglang.test.ci.ci_register import register_cpu_ci
|
||||
from sglang.test.test_utils import CustomTestCase
|
||||
|
||||
register_cpu_ci(est_time=4, suite="stage-a-test-cpu-intel")
|
||||
|
||||
@@ -23,7 +24,7 @@ def _obj():
|
||||
)
|
||||
|
||||
|
||||
class TestApplyRoutingHeaders(unittest.TestCase):
|
||||
class TestApplyRoutingHeaders(CustomTestCase):
|
||||
def test_sets_all_fields_with_types(self):
|
||||
obj = _obj()
|
||||
apply_header_overrides(
|
||||
|
||||
@@ -9,12 +9,13 @@ from sglang.srt.arg_groups.platform_hook import handle_cpu_backends
|
||||
from sglang.srt.arg_groups.validation_hook import validate_ib_devices
|
||||
from sglang.srt.server_args import ServerArgs
|
||||
from sglang.test.ci.ci_register import register_cpu_ci
|
||||
from sglang.test.test_utils import CustomTestCase
|
||||
|
||||
register_cpu_ci(est_time=6, suite="stage-a-test-cpu-intel")
|
||||
register_cpu_ci(est_time=10, suite="base-b-test-cpu-arm64")
|
||||
|
||||
|
||||
class TestServerArgsCPUBackend(unittest.TestCase):
|
||||
class TestServerArgsCPUBackend(CustomTestCase):
|
||||
def _make_server_args(self, attention_backend=None):
|
||||
server_args = ServerArgs.__new__(ServerArgs)
|
||||
server_args.device = "cpu"
|
||||
@@ -45,7 +46,7 @@ class TestServerArgsCPUBackend(unittest.TestCase):
|
||||
self.assertEqual(resolution_result(server_args, "sampling_backend"), "pytorch")
|
||||
|
||||
|
||||
class TestServerArgsIBDeviceValidation(unittest.TestCase):
|
||||
class TestServerArgsIBDeviceValidation(CustomTestCase):
|
||||
def _validate_ib_devices(self, device_str, available_devices=None):
|
||||
available_devices = available_devices or [
|
||||
"mlx5_0",
|
||||
|
||||
Reference in New Issue
Block a user