feat: log multimodal encoder DP tradeoffs (#30903)
This commit is contained in:
@@ -66,6 +66,30 @@ class TestPrepareServerArgs(CustomTestCase):
|
||||
os.unlink(config_file)
|
||||
|
||||
|
||||
class TestMmEncoderDataParallelLogging(CustomTestCase):
|
||||
def test_logs_when_encoder_dp_has_no_parallelism(self):
|
||||
server_args = ServerArgs(
|
||||
model_path="dummy", mm_enable_dp_encoder=True, tp_size=1
|
||||
)
|
||||
|
||||
with self.assertLogs(server_args_module.logger, level="WARNING") as logs:
|
||||
server_args._handle_data_parallelism()
|
||||
|
||||
self.assertIn("TP=1", logs.output[0])
|
||||
self.assertIn("no data-parallel work", logs.output[0])
|
||||
|
||||
def test_logs_encoder_dp_tradeoff_for_tp(self):
|
||||
server_args = ServerArgs(
|
||||
model_path="dummy", mm_enable_dp_encoder=True, tp_size=4
|
||||
)
|
||||
|
||||
with self.assertLogs(server_args_module.logger, level="INFO") as logs:
|
||||
server_args._handle_data_parallelism()
|
||||
|
||||
self.assertIn("TP=4", logs.output[0])
|
||||
self.assertIn("high-resolution or multi-image", logs.output[0])
|
||||
|
||||
|
||||
class TestMultimodalFeatureTransport(CustomTestCase):
|
||||
@patch("sglang.srt.server_args.is_cuda", return_value=True)
|
||||
def test_cuda_ipc_is_explicit_and_bounded(self, _mock_is_cuda):
|
||||
|
||||
Reference in New Issue
Block a user