Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions tests/integration/test_lists/test-db/l0_a10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,11 @@ l0_a10:
- unittest/_torch/test_tensor_lru_cache.py
- unittest/_torch/test_torch_multi_arange.py
- unittest/utils/test_util.py
- unittest/utils/test_logger.py
- unittest/_torch/test_model_config.py
- unittest/models/test_quant_config_utils.py
- unittest/quantization/test_mode.py
- unittest/_torch/modeling/test_modeling_mistral.py
- unittest/_torch/modeling/test_modeling_pixtral.py
- unittest/_torch/modeling/test_modeling_cohere2.py
- unittest/_torch/modeling/test_nemotron_nano_preprocessing.py
- unittest/_torch/modeling/test_modeling_parakeet.py
- unittest/_torch/modeling/test_modeling_radio.py
- unittest/_torch/modeling/test_modeling_step3p7.py
- unittest/_torch/modeling/test_modeling_minicpmv4_6.py
- unittest/_torch/modeling/test_multimodal_encoder_mixin.py
- unittest/_torch/sampler/test_trtllm_sampler.py
Expand All @@ -51,29 +45,13 @@ l0_a10:
- unittest/inputs/test_multimodal_input_processor.py
- unittest/others/test_cache_transceiver_precheck_config.py
- unittest/others/test_cache_transceiver_precheck_run.py
- unittest/others/test_convert_utils.py
- unittest/others/test_lm_eval.py
- unittest/others/test_lora_manager.py
- unittest/others/test_lora_module_count.py
- unittest/others/test_time_breakdown.py
- unittest/others/test_tracing.py
- unittest/disaggregated/test_disagg_openai_client.py
- unittest/disaggregated/test_disagg_utils.py
- unittest/disaggregated/test_coordinator_e2e.py
- unittest/disaggregated/test_coordinator_worker.py
- unittest/disaggregated/test_openai_disagg_server.py
- unittest/disaggregated/test_openai_disagg_service.py
- unittest/disaggregated/test_router.py
- unittest/disaggregated/test_remoteDictionary.py
- unittest/disaggregated/test_agent_multi_backends.py
- unittest/disaggregated/test_messenger.py
- unittest/disaggregated/test_disagg_cluster_manager_worker.py
- unittest/disaggregated/test_cluster_storage.py
- unittest/disaggregated/test_extractor.py
- unittest/disaggregated/test_peer.py
- unittest/disaggregated/test_cache_reuse_adapter.py
- unittest/disaggregated/test_bounce.py
- unittest/disaggregated/region/test_block.py
- unittest/disaggregated/test_mamba_transfer.py
- unittest/tools
- unittest/usage/test_collectors.py
Expand Down
1 change: 0 additions & 1 deletion tests/integration/test_lists/test-db/l0_b200.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ l0_b200:
- kv_cache/test_kv_cache_v2_scheduler.py::TestKVCacheV2LoRA::test_lora_chunked_prefill
- kv_cache/test_kv_cache_v2_scheduler.py::TestKVCacheV2LoRA::test_lora_eviction
# ------------- KV Cache Iteration Stats ---------------
- unittest/metrics/test_collector.py
- kv_cache/test_kv_cache_iteration_stats.py::TestKvCacheIterationStats::test_cold_start
- kv_cache/test_kv_cache_iteration_stats.py::TestKvCacheIterationStats::test_partial_block_reuse
- kv_cache/test_kv_cache_iteration_stats.py::TestKvCacheIterationStats::test_full_block_reuse
Expand Down
15 changes: 14 additions & 1 deletion tests/integration/test_lists/test-db/l0_cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,16 @@ l0_cpu:
- unittest/_torch/distributed
- unittest/_torch/executor
- unittest/_torch/lora
- unittest/_torch/memory
- unittest/_torch/modeling
- unittest/_torch/models/checkpoints
- unittest/_torch/modules
- unittest/_torch/multimodal
- unittest/_torch/ray_orchestrator/single_gpu/test_cache_transceiver_comm.py
- unittest/_torch/speculative/hw_agnostic
- unittest/_torch/test_model_config.py
- unittest/bindings
- unittest/disaggregated
- unittest/executor/test_base_worker.py ISOLATION
- unittest/executor/test_fatal_error_health_check.py
- unittest/executor/test_ipc.py
Expand All @@ -43,4 +50,10 @@ l0_cpu:
- unittest/llmapi/test_request_priority.py
- unittest/llmapi/test_serialization.py
- unittest/llmapi/test_utils.py
- unittest/others/test_http_utils_fail_fast.py
- unittest/metrics/test_collector.py
- unittest/models/test_quant_config_utils.py
- unittest/others
- unittest/quantization/test_mode.py
- unittest/scripts
- unittest/tools
- unittest/utils/test_logger.py
15 changes: 0 additions & 15 deletions tests/integration/test_lists/test-db/l0_h100.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ l0_h100:
- unittest/_torch/debugger
- unittest/_torch/executor
- unittest/_torch/lora
- unittest/_torch/memory
- unittest/_torch/misc
# ------------- modules (non-MoE) ---------------
- unittest/_torch/modules/test_mla_helix.py
Expand Down Expand Up @@ -71,23 +70,10 @@ l0_h100:
- unittest/_torch/modeling/test_modeling_qwen3_5_vl_moe.py::TestQwen3_5MoeVL::test_all
# Dense Qwen3.5-VL is the same hybrid family (sm90+ GDN kernel), so it lands here too.
- unittest/_torch/modeling/test_modeling_qwen3_5_vl.py::TestQwen3_5VL::test_all
- unittest/disaggregated/test_disagg_utils.py
- unittest/disaggregated/test_router.py
- unittest/disaggregated/test_remoteDictionary.py
- unittest/disaggregated/test_agent_multi_backends.py
- unittest/disaggregated/test_messenger.py
- unittest/disaggregated/test_extractor.py
- unittest/disaggregated/test_peer.py
- unittest/disaggregated/test_bounce.py
- unittest/disaggregated/region/test_block.py
- unittest/disaggregated/region/test_aux.py
- unittest/disaggregated/region/test_page.py
- unittest/disaggregated/region/test_region.py
- unittest/disaggregated/test_disaggregated_params.py
- unittest/disaggregated/test_perf_logger.py
- unittest/disaggregated/test_sync_transfer_timing.py
- unittest/disaggregated/test_rank_info.py
- unittest/disaggregated/test_request_id.py
- unittest/disaggregated/test_kv_transfer.py
- unittest/disaggregated/test_kv_transfer_mp.py
- unittest/disaggregated/test_transceiver_bounded_polling.py
Expand Down Expand Up @@ -362,7 +348,6 @@ l0_h100:
- unittest/bindings # 8 mins on H100
- unittest/kv_cache_manager_v2_tests # 4 min
# ------------- KV Cache Iteration Stats ---------------
- unittest/metrics/test_collector.py
- kv_cache/test_kv_cache_iteration_stats.py::TestKvCacheIterationStats::test_cold_start
- kv_cache/test_kv_cache_iteration_stats.py::TestKvCacheIterationStats::test_partial_block_reuse
- kv_cache/test_kv_cache_iteration_stats.py::TestKvCacheIterationStats::test_full_block_reuse
Expand Down
1 change: 0 additions & 1 deletion tests/integration/test_lists/test-db/l0_l40s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ l0_l40s:
- unittest/_torch/modeling -k "modeling_vila"
- unittest/_torch/modeling -k "modeling_nemotron_nano_v2_vl"
- unittest/_torch/modeling/test_modeling_llava_next.py::TestLlavaNext::test_all
- unittest/_torch/modeling/test_modeling_llava_next.py::test_llava_next_expand_prompt_token_ids_for_mm
- unittest/_torch/modeling/test_modeling_qwen2_5vl.py::TestQwen2_5_VL::test_all
- unittest/_torch/modeling/test_modeling_qwen3vl_moe.py::TestQwen3VLMoe::test_all
- unittest/_torch/modeling/test_modeling_qwen3vl.py::TestQwen3VL::test_all
Expand Down
3 changes: 3 additions & 0 deletions tests/unittest/_torch/executor/test_benchmark_disagg.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
from tensorrt_llm._torch.pyexecutor.llm_request import LlmRequestState
from tensorrt_llm._torch.pyexecutor.scheduler import ScheduledRequests

pytestmark = pytest.mark.cpu_only


# ---------------------------------------------------------------------------
# Helpers
# ---------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions tests/unittest/_torch/memory/test_gms_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
_storage_nbytes,
)

pytestmark = pytest.mark.cpu_only


@pytest.fixture(autouse=True)
def _stub_current_device(monkeypatch):
Expand Down
1 change: 1 addition & 0 deletions tests/unittest/_torch/modeling/test_gemma4_multimodal.py
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,7 @@ def _model_available():
return os.path.isfile(os.path.join(MODEL_26B_PATH, "config.json"))


@pytest.mark.cpu_only
class TestGemma4InputProcessor(unittest.TestCase):
"""Tests for Gemma4InputProcessor with real model tokenizer/processor files."""

Expand Down
5 changes: 5 additions & 0 deletions tests/unittest/_torch/modeling/test_modeling_afmoe.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from copy import deepcopy
from unittest.mock import Mock, patch

import pytest
import torch

import tensorrt_llm
Expand Down Expand Up @@ -112,6 +113,7 @@ def _shutdown_kv_cache_manager(kv_cache_manager: KVCacheManager) -> None:
kv_cache_manager.shutdown()


@pytest.mark.cpu_only
class TestAfmoeRegistry(unittest.TestCase):
"""Verify AfmoeForCausalLM resolves through _torch auto-model registration."""

Expand All @@ -128,6 +130,7 @@ def test_legacy_model_map_does_not_contain_afmoe(self):
self.assertNotIn("AfmoeForCausalLM", MODEL_MAP)


@pytest.mark.cpu_only
class TestAfmoeRoutingValidation(unittest.TestCase):
"""Verify routing assumption guards."""

Expand Down Expand Up @@ -158,6 +161,7 @@ def test_model_init_rejects_invalid_routing(self):
AfmoeForCausalLM(model_config)


@pytest.mark.cpu_only
class TestAfmoeWeightMapper(unittest.TestCase):
"""Verify AfmoeHfWeightMapper key transformations."""

Expand Down Expand Up @@ -264,6 +268,7 @@ def test_is_special_instance_module_for_moe(self):
self.assertFalse(self.mapper.is_special_instance_module(mock_linear))


@pytest.mark.cpu_only
class TestAfmoeWeightLoading(unittest.TestCase):
"""Verify AfmoeForCausalLM applies mapper preprocessing in the real load hook."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def get_scenarios(self) -> List[TestLlavaNextScenario]:
return scenarios


@pytest.mark.cpu_only
def test_llava_next_expand_prompt_token_ids_for_mm():
"""Test LlavaNextInputProcessor.expand_prompt_token_ids_for_mm replaces image placeholders correctly."""
model_path = LLAVA_NEXT_7B_CONFIG["_name_or_path"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def _make_minimal_nano_model_config():
)


@pytest.mark.cpu_only
def test_nemotron_nano_registers_native_multimodal_epd_components():
"""Native Nano VL/Omni classes advertise MM EPD support."""
for arch in ("NemotronH_Nano_VL_V2", "NemotronH_Nano_Omni_Reasoning_V3"):
Expand Down Expand Up @@ -96,6 +97,7 @@ def _assert_nano_video_handoff(handoff):
],
ids=["prompt", "prompt_token_ids"],
)
@pytest.mark.cpu_only
def test_nemotron_nano_epd_handoff_preserves_non_contiguous_video_runs(
input_field, input_value, asserts_encode_not_called
):
Expand Down Expand Up @@ -149,6 +151,7 @@ def test_nemotron_nano_epd_handoff_preserves_non_contiguous_video_runs(
],
ids=["normal_worker", "mm_epd_worker"],
)
@pytest.mark.cpu_only
def test_nemotron_nano_multimodal_encoder_load_by_worker_role(env_value, expects_encoder):
"""Encoder load depends on whether the worker runs raw MM prefill or consumes embeddings."""
fake_encoder = MagicMock()
Expand Down Expand Up @@ -186,6 +189,7 @@ def test_nemotron_nano_multimodal_encoder_load_by_worker_role(env_value, expects
vision_encoder_cls.assert_not_called()


@pytest.mark.cpu_only
def test_nemotron_nano_rejects_evs_attached_video_embeddings():
"""EVS needs retained-token metadata that E/P attached embeddings do not carry."""
model = SimpleNamespace(
Expand Down Expand Up @@ -277,6 +281,7 @@ def nano_llm_model():
torch.cuda.empty_cache()


@pytest.mark.cpu_only
@pytest.mark.parametrize("condition", ["single", "multiple"])
@pytest.mark.parametrize("modality", ["image", "video"])
def test_nemotron_nano_v2_vl_input_processor(data_dict_fixture, condition, modality):
Expand Down Expand Up @@ -558,6 +563,7 @@ def _build_inputs(prompts_subset, media_subset):
)


@pytest.mark.cpu_only
class TestEncodeMultimodalDispatch:
def _make_mock_model(self):
"""Create a minimal mock with the attributes `_encode_multimodal` needs."""
Expand Down Expand Up @@ -619,6 +625,7 @@ def test_encode_multimodal_unknown_modality_raises(self):
NemotronH_Nano_VL_V2._encode_multimodal(model, [mm_param])


@pytest.mark.cpu_only
class TestSoundPlaceholderInjection:
"""Test the sound placeholder token's injection points.

Expand Down Expand Up @@ -688,6 +695,7 @@ def test_three_videos_first_and_third_have_audio(self):
)


@pytest.mark.cpu_only
class TestEncodeMultimodalAudioOrder:
"""Test video / audio embedding order in multi-item scenarios."""

Expand Down Expand Up @@ -807,6 +815,7 @@ def test_no_audio_concat_when_sound_encoder_is_none(self):
model._encode_audio.assert_not_called()


@pytest.mark.cpu_only
class TestInterleaveVideoAudioEmbeddings:
"""Directly test `_interleave_video_audio_embeddings` with synthetic data."""

Expand Down Expand Up @@ -920,6 +929,7 @@ def test_multi_clip_audio(self):
assert torch.equal(result, expected)


@pytest.mark.cpu_only
class TestEncodeAudio:
"""Numerical equivalence: batched audio vs per-input encoding.

Expand Down Expand Up @@ -1011,6 +1021,7 @@ def test_empty_input(self):
assert NemotronH_Nano_VL_V2._encode_audio(model, []) == []


@pytest.mark.cpu_only
class TestEncodeMultimodalContract:
"""Verify `_encode_multimodal` conforms to the contract expected by `get_multimodal_embeddings`.

Expand Down Expand Up @@ -1098,6 +1109,7 @@ def test_empty_params_returns_empty_list(self):
assert result == []


@pytest.mark.cpu_only
class TestChunkedPrefillCaching:
"""Verify that `_encode_multimodal` output is compatible with `get_multimodal_embeddings`.

Expand Down
1 change: 1 addition & 0 deletions tests/unittest/_torch/modeling/test_modeling_parakeet.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def _make_sound_config(**overrides):
return SimpleNamespace(**defaults)


@pytest.mark.cpu_only
class TestParakeetExtractor:
def test_clip_sizes_short_audio(self):
ext = _make_extractor()
Expand Down
1 change: 1 addition & 0 deletions tests/unittest/_torch/modeling/test_modeling_qwen3vl.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,7 @@ def test_rot_pos_ids_matches_gpu_reference(grid_thw_list):
torch.testing.assert_close(actual, expected, atol=0, rtol=0)


@pytest.mark.cpu_only
def test_rot_pos_ids_lru_cache_hit():
"""Repeated (h, w, spatial_merge_size) keys must hit the lru_cache and
return the same underlying tensor object (no recompute)."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@
from types import SimpleNamespace
from unittest.mock import MagicMock

import pytest

from tensorrt_llm._torch.models.modeling_qwen3vl import (
Qwen3VLInputProcessorBase,
_decide_do_sample_frames,
)

pytestmark = pytest.mark.cpu_only


def _fake_video(metadata, *, n_frames=8):
"""Stand-in for VideoData: only `.frames` (count) and `.metadata` are read."""
Expand Down
4 changes: 4 additions & 0 deletions tests/unittest/_torch/modeling/test_modeling_step3p7.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@
import types
import unittest

import pytest
import torch
from parameterized import parameterized
from transformers import PretrainedConfig
from utils.llm_data import llm_models_root

pytestmark = pytest.mark.cpu_only


# Resolve the Step3p7 checkpoints under the shared model root (LLM_MODELS_ROOT)
# like the other modeling tests instead of hard-coding a developer workspace
# path. The FP8 block-scale, NVFP4, and BF16 reference checkpoints share the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
)
from tensorrt_llm.inputs.multimodal_data import AudioData

pytestmark = pytest.mark.cpu_only


def make_tiler(**overrides):
"""Create a DynamicResolutionImageTiler with sensible defaults."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from tensorrt_llm._torch.models.checkpoints.base_weight_loader import ConsumableWeightsDict
from tensorrt_llm.mapping import Mapping

pytestmark = pytest.mark.cpu_only


class MyError(Exception):
pass
Expand Down
2 changes: 2 additions & 0 deletions tests/unittest/_torch/models/checkpoints/laguna/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
from tensorrt_llm._torch.models.modeling_laguna import LagunaHfWeightMapper
from tensorrt_llm._torch.modules.fused_moe.interface import MoE

pytestmark = pytest.mark.cpu_only


class _FakeQuantMode:
def __init__(self, *, nvfp4: bool = False, fp8_block_scales: bool = False):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest

from tensorrt_llm._torch.models.checkpoints.mistral.config_loader import adapt_config_dict

pytestmark = pytest.mark.cpu_only


def test_mistral_large3_vision_config_preserves_max_position_embeddings():
config = {
Expand Down
Loading
Loading