diff --git a/components/src/dynamo/trtllm/tests/test_trtllm_autodeploy.py b/components/src/dynamo/trtllm/tests/test_trtllm_autodeploy.py index 3394a912e2d3..fa4785a86d7b 100644 --- a/components/src/dynamo/trtllm/tests/test_trtllm_autodeploy.py +++ b/components/src/dynamo/trtllm/tests/test_trtllm_autodeploy.py @@ -28,8 +28,11 @@ # the `gpu_0` marker. pytest.mark.gpu_1, pytest.mark.pre_merge, - pytest.mark.profiled_vram_gib(0), ] + +# Intentionally unprofiled: these import-heavy, zero-VRAM tests run in the +# sequential GPU stage so TensorRT-LLM initialization is shared. + _PYTORCH_LLM_CLS_NAME = "dynamo.trtllm.engine.LLM" _AUTODEPLOY_LLM_CLS_NAME = "tensorrt_llm._torch.auto_deploy.LLM" diff --git a/components/src/dynamo/trtllm/tests/test_trtllm_image_token_resolver.py b/components/src/dynamo/trtllm/tests/test_trtllm_image_token_resolver.py index fca91ea24b8b..0fe58f45aeee 100644 --- a/components/src/dynamo/trtllm/tests/test_trtllm_image_token_resolver.py +++ b/components/src/dynamo/trtllm/tests/test_trtllm_image_token_resolver.py @@ -27,9 +27,11 @@ pytest.mark.multimodal, pytest.mark.unit, pytest.mark.gpu_1, - pytest.mark.profiled_vram_gib(0), ] +# Intentionally unprofiled: these import-heavy, zero-VRAM tests run in the +# sequential GPU stage so TensorRT-LLM initialization is shared. + def _config(model: str = "org/model") -> SimpleNamespace: return SimpleNamespace(model=model, revision=None) diff --git a/components/src/dynamo/trtllm/tests/test_trtllm_logits_runtime.py b/components/src/dynamo/trtllm/tests/test_trtllm_logits_runtime.py index c87b008539e4..2c423860da46 100644 --- a/components/src/dynamo/trtllm/tests/test_trtllm_logits_runtime.py +++ b/components/src/dynamo/trtllm/tests/test_trtllm_logits_runtime.py @@ -38,9 +38,11 @@ pytest.mark.trtllm, pytest.mark.pre_merge, pytest.mark.gpu_1, - pytest.mark.profiled_vram_gib(0), ] +# Intentionally unprofiled: the zero-VRAM tests run in the sequential GPU stage +# so TensorRT-LLM initialization is shared. The CUDA test overrides this below. + # --------------------------------------------------------------------------- # TRT-LLM attach_logits_processors contract @@ -157,10 +159,9 @@ def test_adapter_invokes_or_logs_on_bad_shape(shape, expect_invoke, caplog): ) -# Unlike the rest of this module (CPU-only mocks, module-level -# profiled_vram_gib(0)), this test initializes a real CUDA context, so the -# GPU-parallel scheduler must reserve VRAM for it instead of packing it onto -# an already-full GPU as a zero-VRAM filler. +# Unlike the rest of this module (unprofiled CPU-only mocks), this test +# initializes a real CUDA context, so the GPU-parallel scheduler must reserve +# VRAM for it. @pytest.mark.profiled_vram_gib(2.0) @pytest.mark.requested_trtllm_vram_gib(2.0) def test_adapter_enters_engine_cuda_stream(): diff --git a/components/src/dynamo/trtllm/tests/test_trtllm_main_init.py b/components/src/dynamo/trtllm/tests/test_trtllm_main_init.py index aba992af1f5c..4e7961610461 100644 --- a/components/src/dynamo/trtllm/tests/test_trtllm_main_init.py +++ b/components/src/dynamo/trtllm/tests/test_trtllm_main_init.py @@ -15,9 +15,11 @@ pytest.mark.trtllm, pytest.mark.gpu_1, pytest.mark.pre_merge, - pytest.mark.profiled_vram_gib(0), ] +# Intentionally unprofiled: these import-heavy, zero-VRAM tests run in the +# sequential GPU stage so TensorRT-LLM initialization is shared. + def test_tensorrt_llm_metrics_collector_import(): """Test that we can import MetricsCollector from TensorRT-LLM.""" diff --git a/components/src/dynamo/trtllm/tests/test_trtllm_multimodal_processor.py b/components/src/dynamo/trtllm/tests/test_trtllm_multimodal_processor.py index 450009d62e5a..88580251eabd 100644 --- a/components/src/dynamo/trtllm/tests/test_trtllm_multimodal_processor.py +++ b/components/src/dynamo/trtllm/tests/test_trtllm_multimodal_processor.py @@ -29,9 +29,11 @@ pytest.mark.multimodal, pytest.mark.pre_merge, pytest.mark.gpu_1, - pytest.mark.profiled_vram_gib(0), ] +# Intentionally unprofiled: these import-heavy, zero-VRAM tests run in the +# sequential GPU stage so TensorRT-LLM initialization is shared. + @pytest.mark.asyncio @pytest.mark.parametrize( diff --git a/components/src/dynamo/trtllm/tests/test_trtllm_unit.py b/components/src/dynamo/trtllm/tests/test_trtllm_unit.py index bbfbb79bbc57..02891813d6b0 100644 --- a/components/src/dynamo/trtllm/tests/test_trtllm_unit.py +++ b/components/src/dynamo/trtllm/tests/test_trtllm_unit.py @@ -42,9 +42,11 @@ pytest.mark.trtllm, pytest.mark.gpu_1, pytest.mark.pre_merge, - pytest.mark.profiled_vram_gib(0), ] +# Intentionally unprofiled: these import-heavy, zero-VRAM tests run in the +# sequential GPU stage so TensorRT-LLM initialization is shared. + # Create TRTLLM-specific CLI args fixture # This will use monkeypatch to write to argv diff --git a/examples/backends/trtllm/launch/disagg_multimodal.sh b/examples/backends/trtllm/launch/disagg_multimodal.sh index f112c0b511aa..bf5dfb9f63f1 100755 --- a/examples/backends/trtllm/launch/disagg_multimodal.sh +++ b/examples/backends/trtllm/launch/disagg_multimodal.sh @@ -28,11 +28,16 @@ fi HTTP_PORT="${DYN_HTTP_PORT:-8000}" print_launch_banner --multimodal "Launching Disaggregated Multimodal Serving (2 GPUs)" "$MODEL_PATH" "$HTTP_PORT" +# Multi-worker launchers use numbered status ports; do not pass the single-worker +# alias to the frontend. +unset DYN_SYSTEM_PORT + # run frontend # dynamo.frontend accepts either --http-port flag or DYN_HTTP_PORT env var (defaults to 8000) python3 -m dynamo.frontend & # run prefill worker +DYN_SYSTEM_PORT=${DYN_SYSTEM_PORT1:-8081} \ CUDA_VISIBLE_DEVICES=$PREFILL_CUDA_VISIBLE_DEVICES python3 -m dynamo.trtllm \ --model-path "$MODEL_PATH" \ --served-model-name "$SERVED_MODEL_NAME" \ @@ -42,6 +47,7 @@ CUDA_VISIBLE_DEVICES=$PREFILL_CUDA_VISIBLE_DEVICES python3 -m dynamo.trtllm \ --disaggregation-mode prefill & # run decode worker +DYN_SYSTEM_PORT=${DYN_SYSTEM_PORT2:-8082} \ CUDA_VISIBLE_DEVICES=$DECODE_CUDA_VISIBLE_DEVICES python3 -m dynamo.trtllm \ --model-path "$MODEL_PATH" \ --served-model-name "$SERVED_MODEL_NAME" \ diff --git a/tests/kvbm_integration/test_consolidator_config_unit.py b/tests/kvbm_integration/test_consolidator_config_unit.py index 17fd4507f944..27911a04c041 100644 --- a/tests/kvbm_integration/test_consolidator_config_unit.py +++ b/tests/kvbm_integration/test_consolidator_config_unit.py @@ -49,12 +49,13 @@ def test_env_var_disables(self): assert should_enable_consolidator(arg_map) is False +# Intentionally unprofiled: these import-heavy, zero-VRAM tests run in the +# sequential GPU stage so TensorRT-LLM initialization is shared. @pytest.mark.unit @pytest.mark.pre_merge @pytest.mark.kvbm @pytest.mark.trtllm @pytest.mark.gpu_1 -@pytest.mark.profiled_vram_gib(0) class TestShouldEnableConsolidatorTyped: """Tests that need trtllm (requires GPU for import).""" diff --git a/tests/serve/test_trtllm.py b/tests/serve/test_trtllm.py index 808e17b9db2a..4f8c2aa0fb1a 100644 --- a/tests/serve/test_trtllm.py +++ b/tests/serve/test_trtllm.py @@ -352,11 +352,12 @@ class TRTLLMConfig(EngineConfig): pytest.mark.pre_merge, pytest.mark.profiled_vram_gib(15.0), pytest.mark.requested_trtllm_kv_tokens(1056), + pytest.mark.timeout(360), # 3x measured 118s CI runtime ], model="Qwen/Qwen3-VL-2B-Instruct", frontend_port=DefaultPort.FRONTEND.value, - timeout=900, - delayed_start=120, + timeout=300, + health_check_workers=True, request_payloads=[ multimodal_payload_default( text="Describe what you see in this image.", @@ -366,6 +367,9 @@ class TRTLLMConfig(EngineConfig): env={ "PREFILL_CUDA_VISIBLE_DEVICES": "0", "DECODE_CUDA_VISIBLE_DEVICES": "0", + # Make worker /health readiness depend on a successful one-token + # engine canary instead of the system-status server alone. + "DYN_HEALTH_CHECK_ENABLED": "true", }, ), "e_pd_multimodal": TRTLLMConfig( diff --git a/tests/serve/test_trtllm_mm_hashes_protocol.py b/tests/serve/test_trtllm_mm_hashes_protocol.py index ffb70b8c3a86..2779eb08ba21 100644 --- a/tests/serve/test_trtllm_mm_hashes_protocol.py +++ b/tests/serve/test_trtllm_mm_hashes_protocol.py @@ -26,9 +26,11 @@ pytest.mark.multimodal, pytest.mark.unit, pytest.mark.gpu_1, - pytest.mark.profiled_vram_gib(0), ] +# Intentionally unprofiled: these import-heavy, zero-VRAM tests run in the +# sequential GPU stage so TensorRT-LLM initialization is shared. + def test_trtllm_qwen2vl_uses_in_vocab_image_markers() -> None: from tensorrt_llm._torch.models.modeling_qwen2vl import Qwen2VLInputProcessorBase