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
2 changes: 0 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,6 @@ common-files: &common_files |
tests/unittest/trt/model/test_nemotron_nas.py |
tests/unittest/trt/model/test_phi.py |
tests/unittest/trt/model/test_unet.py |
tests/unittest/trt/model_api/profile_utils.py |
tests/unittest/trt/model_api/test_model_api_multi_gpu.py |
tests/unittest/trt/model_api/test_model_level_api.py |
tests/unittest/trt/model_api/test_model_quantization.py |
Expand Down Expand Up @@ -2671,7 +2670,6 @@ legacy-files: &legacy_files |
tests/unittest/trt/model/test_nemotron_nas.py |
tests/unittest/trt/model/test_phi.py |
tests/unittest/trt/model/test_unet.py |
tests/unittest/trt/model_api/profile_utils.py |
tests/unittest/trt/model_api/test_model_api_multi_gpu.py |
tests/unittest/trt/model_api/test_model_level_api.py |
tests/unittest/trt/model_api/test_model_quantization.py |
Expand Down
12 changes: 10 additions & 2 deletions jenkins/scripts/cbts/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ def _strip_params(s: str) -> str:
return s.rsplit("[", 1)[0] if "[" in s else s


def _normalize_target_path(target: str) -> str:
"""Normalize directory-style targets without changing the root sentinel."""
return target.rstrip("/") or target


def _entry_target(entry: str) -> str:
"""Canonical "target" key for indexing/lookup.

Expand All @@ -176,7 +181,7 @@ def _entry_target(entry: str) -> str:
`file.py::TestC::test_m[a-b] TIMEOUT (90)` → `file.py::TestC::test_m`
`file.py -k "kw"` → `file.py`
"""
return _strip_params(_strip_pytest_options(normalize_test_id(entry)))
return _normalize_target_path(_strip_params(_strip_pytest_options(normalize_test_id(entry))))


def _target_in_filter_subtree(target: str, filter_prefix: str) -> bool:
Expand All @@ -185,6 +190,8 @@ def _target_in_filter_subtree(target: str, filter_prefix: str) -> bool:
`target` matches when it is `filter_prefix` itself or a descendant of it
(params / method / file / dir component below) in the pytest tree.
"""
target = _normalize_target_path(target)
filter_prefix = _normalize_target_path(filter_prefix)
if target == filter_prefix:
return True
return (
Expand All @@ -204,6 +211,7 @@ def _path_lookup_anchor(yaml_path: str) -> str:
cover most blocks. Test files anchor on themselves. A top-level
helper with no enclosing dir returns "" — caller treats as no-match.
"""
yaml_path = _normalize_target_path(yaml_path)
base = yaml_path.rsplit("/", 1)[-1]
if not base.startswith("test_"):
return yaml_path.rsplit("/", 1)[0] if "/" in yaml_path else ""
Expand Down Expand Up @@ -256,7 +264,7 @@ def _load_one(self, yml_path: Path) -> None:
for test in tests:
seen: set[str] = set()
norm = normalize_test_id(test)
canonical = _strip_params(_strip_pytest_options(norm))
canonical = _normalize_target_path(_strip_params(_strip_pytest_options(norm)))
for key in (test, norm, _strip_pytest_options(norm), canonical):
if key and key not in seen:
seen.add(key)
Expand Down
1 change: 0 additions & 1 deletion legacy-files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,6 @@ tests/unittest/trt/model/test_mistral.py
tests/unittest/trt/model/test_nemotron_nas.py
tests/unittest/trt/model/test_phi.py
tests/unittest/trt/model/test_unet.py
tests/unittest/trt/model_api/profile_utils.py
tests/unittest/trt/model_api/test_model_api_multi_gpu.py
tests/unittest/trt/model_api/test_model_level_api.py
tests/unittest/trt/model_api/test_model_quantization.py
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1345,7 +1345,6 @@ exclude = [
"tests/unittest/trt/model/test_nemotron_nas.py",
"tests/unittest/trt/model/test_phi.py",
"tests/unittest/trt/model/test_unet.py",
"tests/unittest/trt/model_api/profile_utils.py",
"tests/unittest/trt/model_api/test_model_api_multi_gpu.py",
"tests/unittest/trt/model_api/test_model_level_api.py",
"tests/unittest/trt/model_api/test_model_quantization.py",
Expand Down
3 changes: 0 additions & 3 deletions ruff-legacy-baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2298,9 +2298,6 @@
"F403": 1,
"F405": 13
},
"tests/unittest/trt/model_api/profile_utils.py": {
"D415": 1
},
"tests/unittest/trt/model_api/test_model_api_multi_gpu.py": {
"D200": 1,
"D300": 1,
Expand Down
1 change: 0 additions & 1 deletion ruff-legacy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,6 @@ include = [
"tests/unittest/trt/model/test_nemotron_nas.py",
"tests/unittest/trt/model/test_phi.py",
"tests/unittest/trt/model/test_unet.py",
"tests/unittest/trt/model_api/profile_utils.py",
"tests/unittest/trt/model_api/test_model_api_multi_gpu.py",
"tests/unittest/trt/model_api/test_model_level_api.py",
"tests/unittest/trt/model_api/test_model_quantization.py",
Expand Down
12 changes: 6 additions & 6 deletions tests/integration/defs/agg_unit_mem_df.csv
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ unittest/trt/attention/test_gpt_attention_IFB.py,NVIDIA A10,17,
unittest/trt/attention/test_gpt_attention_no_cache.py,NVIDIA A10,23,
unittest/trt/model/test_mamba.py,NVIDIA A10,12,
unittest/trt/model/test_llama.py,NVIDIA A10,3,
unittest/kv_cache_manager_v2_tests/,NVIDIA A10,8,
unittest/kv_cache_manager_v2_tests,NVIDIA A10,8,
"unittest/trt/attention/test_gpt_attention.py -k ""partition0""",NVIDIA A10,14,
"unittest/trt/attention/test_gpt_attention.py -k ""partition1""",NVIDIA A10,10,
"unittest/trt/attention/test_gpt_attention.py -k ""partition2""",NVIDIA A10,3,
Expand Down Expand Up @@ -49,7 +49,7 @@ unittest/trt/quantization/test_weight_only_groupwise_quant_matmul.py,NVIDIA H100
unittest/trt/attention/test_gpt_attention_IFB.py,NVIDIA H100 80GB HBM3,11,
unittest/trt/attention/test_gpt_attention_no_cache.py,NVIDIA H100 80GB HBM3,13,
unittest/trt/model/test_mamba.py,NVIDIA H100 80GB HBM3,10,
unittest/kv_cache_manager_v2_tests/,NVIDIA H100 80GB HBM3,8,
unittest/kv_cache_manager_v2_tests,NVIDIA H100 80GB HBM3,8,
"unittest/trt/attention/test_gpt_attention.py -k ""partition0""",NVIDIA L40S,14,
"unittest/trt/attention/test_gpt_attention.py -k ""partition1""",NVIDIA L40S,10,
"unittest/trt/attention/test_gpt_attention.py -k ""partition2""",NVIDIA L40S,6,
Expand All @@ -72,7 +72,7 @@ unittest/trt/quantization/test_weight_only_groupwise_quant_matmul.py,NVIDIA H100
unittest/trt/attention/test_gpt_attention_IFB.py,NVIDIA H100 PCIe,11,
unittest/trt/attention/test_gpt_attention_no_cache.py,NVIDIA H100 PCIe,13,
unittest/trt/model/test_mamba.py,NVIDIA H100 PCIe,10,
unittest/kv_cache_manager_v2_tests/,NVIDIA H100 PCIe,8,
unittest/kv_cache_manager_v2_tests,NVIDIA H100 PCIe,8,
llmapi-tp-2gpu,NVIDIA H100 NVL,1,
unittest/llmapi/test_llm_models_multi_gpu.py,NVIDIA H100 NVL,1,
unittest/trt/model/test_gptneox.py,NVIDIA H100 NVL,7,
Expand All @@ -89,7 +89,7 @@ unittest/trt/quantization/test_weight_only_groupwise_quant_matmul.py,NVIDIA H100
unittest/trt/attention/test_gpt_attention_IFB.py,NVIDIA H100 NVL,11,
unittest/trt/attention/test_gpt_attention_no_cache.py,NVIDIA H100 NVL,13,
unittest/trt/model/test_mamba.py,NVIDIA H100 NVL,10,
unittest/kv_cache_manager_v2_tests/,NVIDIA H100 NVL,8,
unittest/kv_cache_manager_v2_tests,NVIDIA H100 NVL,8,
llmapi-tp-2gpu,NVIDIA H100,1,
unittest/llmapi/test_llm_models_multi_gpu.py,NVIDIA H100,1,
unittest/trt/model/test_gptneox.py,NVIDIA H100,7,
Expand All @@ -106,7 +106,7 @@ unittest/trt/quantization/test_weight_only_groupwise_quant_matmul.py,NVIDIA H100
unittest/trt/attention/test_gpt_attention_IFB.py,NVIDIA H100,11,
unittest/trt/attention/test_gpt_attention_no_cache.py,NVIDIA H100,13,
unittest/trt/model/test_mamba.py,NVIDIA H100,10,
unittest/kv_cache_manager_v2_tests/,NVIDIA H100,8,
unittest/kv_cache_manager_v2_tests,NVIDIA H100,8,
"unittest/trt/attention/test_gpt_attention.py -k ""partition0""",NVIDIA L40,14,
"unittest/trt/attention/test_gpt_attention.py -k ""partition1""",NVIDIA L40,10,
"unittest/trt/attention/test_gpt_attention.py -k ""partition2""",NVIDIA L40,6,
Expand All @@ -126,7 +126,7 @@ unittest/_torch/attention,NVIDIA B200,4,
unittest/_torch/misc,NVIDIA B200,4,
unittest/_torch/speculative/test_eagle3.py,NVIDIA B200,4,
unittest/_torch/thop/parallel,NVIDIA B200,16,
unittest/kv_cache_manager_v2_tests/,NVIDIA B200,8,
unittest/kv_cache_manager_v2_tests,NVIDIA B200,8,
unittest/auto_deploy/singlegpu/compile,NVIDIA H100,4,
unittest/auto_deploy/singlegpu/custom_ops,NVIDIA H100,4,
unittest/auto_deploy/singlegpu/models,NVIDIA H100,4,
Expand Down
11 changes: 6 additions & 5 deletions tests/integration/test_lists/test-db/l0_a10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,15 @@ l0_a10:
- unittest/_torch/executor/test_kv_cache_budget_split.py
- unittest/_torch/executor/test_kv_pool_rebalance.py
- unittest/_torch/executor/test_disagg_index_mapper_early_release.py
- unittest/_torch/pyexecutor/test_kv_cache_compression_manager.py
- unittest/_torch/pyexecutor/test_error_classification.py
- unittest/_torch/executor/test_kv_cache_compression_manager.py
- unittest/_torch/executor/test_error_classification.py
- unittest/_torch/modules/dwdp/test_dwdp_fixup_moe_backends.py
- unittest/_torch/modules/dwdp/test_dwdp_manager.py
- unittest/_torch/modules/dwdp/test_dwdp_mapping.py
- unittest/_torch/modules/dwdp/test_dwdp_peer_ranges.py
# NOTE: this is a CPU-only test, but we do not have a dedicated job for this (and therefore no
# test list either).
- unittest/_torch/models/checkpoints/hf/test_weight_loader.py
- unittest/_torch/models/checkpoints/hf/test_checkpoint_loader.py
- unittest/_torch/models/checkpoints
- unittest/_torch/weight_sharing
- unittest/inputs/test_chat_template_dispatch.py
- unittest/inputs/test_content_format.py
Expand All @@ -70,6 +69,7 @@ l0_a10:
- unittest/disaggregated/test_peer.py
- unittest/disaggregated/region/test_block.py
- unittest/disaggregated/test_mamba_transfer.py
- unittest/tools
- unittest/usage/test_collectors.py
- unittest/usage/test_config.py
- unittest/usage/test_opt_out.py
Expand Down Expand Up @@ -204,7 +204,7 @@ l0_a10:
backend: tensorrt
tests:
# ------------- TRT tests ---------------
- unittest/kv_cache_manager_v2_tests/ # 4 min
- unittest/kv_cache_manager_v2_tests # 4 min
- unittest/dynamo
- unittest/api_stability
- unittest/bindings
Expand Down Expand Up @@ -247,6 +247,7 @@ l0_a10:
- test_e2e.py::test_trtllm_bench_sanity[--non-streaming-FP16-meta-llama/Llama-3.1-8B-llama-3.1-model/Meta-Llama-3.1-8B]
- test_e2e.py::test_trtllm_bench_latency_sanity[FP16-meta-llama/Llama-3.1-8B-llama-3.1-model/Meta-Llama-3.1-8B]
- unittest/trt/quantization
- unittest/trt/python_plugin
- unittest/trt/functional # 37 mins
- llmapi/test_llm_examples.py::test_llmapi_quickstart_atexit
- unittest/test_model_runner_cpp.py
Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_lists/test-db/l0_a100.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ l0_a100:
- unittest/trt/model_api/test_model_api_multi_gpu.py
- unittest/trt/model/test_gpt_e2e.py
- unittest/trt/model/eagle
- unittest/trt/model/redrafter
- unittest/llmapi/test_llm_models.py -m "part0"
- examples/test_whisper.py::test_llm_whisper_general[large-v3-disable_gemm_plugin-enable_attention_plugin-disable_weight_only-float16-nb:1-use_cpp_runtime]
- examples/test_whisper.py::test_llm_whisper_general[large-v3-disable_gemm_plugin-enable_attention_plugin-disable_weight_only-float16-nb:1-use_python_runtime]
Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_lists/test-db/l0_a30.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ l0_a30:
tests:
- unittest/auto_deploy/singlegpu/compile
- unittest/auto_deploy/singlegpu/custom_ops
- unittest/auto_deploy/singlegpu/mlir
- unittest/auto_deploy/singlegpu/models
- unittest/auto_deploy/singlegpu/shim
- unittest/auto_deploy/singlegpu/smoke
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_lists/test-db/l0_b200.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ l0_b200:
- unittest/tools/test_layer_wise_benchmarks.py::test_nemotron_gen_dep[1]
- unittest/tools/test_layer_wise_benchmarks.py::test_qwen3_next_gen_tep[1]
- unittest/tools/test_layer_wise_benchmarks.py::test_performance_alignment[1]
- unittest/kv_cache_manager_v2_tests/
- unittest/kv_cache_manager_v2_tests
# ------------- KV Cache V2 Scheduler IT ---------------
- kv_cache/test_kv_cache_v2_scheduler.py::TestKVCacheV2Llama::test_v2_vs_v1_basic
- kv_cache/test_kv_cache_v2_scheduler.py::TestKVCacheV2Llama::test_token_budget_limited
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/test_lists/test-db/l0_dgx_h100.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ l0_dgx_h100:
- unittest/llmapi/test_llm_multi_gpu_pytorch.py -m "gpu2"
- unittest/llmapi/test_additional_model_outputs.py -m "gpu2"
- unittest/_torch/multi_gpu -m "not post_merge" TIMEOUT (90)
- unittest/_torch/distributed
- unittest/_torch/modeling/test_modeling_pixtral.py::test_tensor_parallelism
# ------------- Disaggregated serving tests ---------------
- accuracy/test_disaggregated_serving.py::TestLlama3_1_8BInstruct::test_eagle3[eagle3_one_model=True-overlap_scheduler=True]
Expand Down Expand Up @@ -376,6 +377,7 @@ l0_dgx_h100:
auto_trigger: others
orchestrator: mpi
tests:
- unittest/auto_deploy/multigpu/compile
- unittest/auto_deploy/multigpu/custom_ops
- unittest/auto_deploy/multigpu/smoke
- unittest/auto_deploy/multigpu/transformations
Expand Down
7 changes: 6 additions & 1 deletion tests/integration/test_lists/test-db/l0_h100.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ l0_h100:
tests:
# ------------- PyTorch tests ---------------
- unittest/_torch/attention
- unittest/_torch/auto_deploy
- unittest/_torch/compilation
- 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 @@ -94,6 +96,7 @@ l0_h100:
- unittest/others/test_kv_cache_transceiver.py::test_kv_cache_transceiver_single_process[PYTHON-mha-ctx_fp16_gen_fp16]
- unittest/others/test_kv_cache_transceiver.py::test_kv_cache_transceiver_single_process[PYTHON-mla-ctx_fp16_gen_fp16]
- unittest/llmapi/test_llm_telemetry.py
- unittest/scaffolding
- unittest/usage/test_collectors.py
- unittest/usage/test_config.py
- unittest/usage/test_opt_out.py
Expand Down Expand Up @@ -312,6 +315,7 @@ l0_h100:
- test_e2e.py::test_trtllm_bench_iteration_log[TRT-streaming-meta-llama/Llama-3.1-8B-llama-3.1-model/Meta-Llama-3.1-8B]
- examples/test_qwen.py::test_llm_hf_qwen_multi_lora_1gpu[qwen2.5_1.5b_instruct]
- unittest/trt/model/eagle # 1 mins on H100
- unittest/trt/model/redrafter
- unittest/llmapi/test_llm_quant.py # 5.5 mins on H100
- examples/visual_gen/test_visual_gen.py::test_visual_gen_quickstart
- examples/visual_gen/test_visual_gen.py::test_visual_gen_api_walkthrough
Expand Down Expand Up @@ -495,7 +499,7 @@ l0_h100:
- unittest/trt/model/test_gpt_e2e.py # 3 mins / 6 mins on H100
- unittest/trt/attention/test_gpt_attention_no_cache.py
- examples/test_gpt.py::test_gpt_oss_20b_lora_torch[gpt-oss-20b-lora-adapter_NIM_r8-gpt-oss-20b]
- unittest/kv_cache_manager_v2_tests/ # 4 min
- unittest/kv_cache_manager_v2_tests # 4 min
# ------------- KV Cache Iteration Stats ---------------
- unittest/executor/test_stats_serializer.py
- unittest/metrics/test_collector.py
Expand Down Expand Up @@ -538,6 +542,7 @@ l0_h100:
tests:
- unittest/auto_deploy/singlegpu/compile
- unittest/auto_deploy/singlegpu/custom_ops
- unittest/auto_deploy/singlegpu/mlir
- unittest/auto_deploy/singlegpu/models
- unittest/auto_deploy/singlegpu/shim
- unittest/auto_deploy/singlegpu/smoke
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_lists/test-db/l0_sanity_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ l0_sanity_check:
- unittest/others/test_kv_cache_transceiver.py::test_async_transfer_keeps_llm_request_alive
- unittest/others/test_kv_cache_transceiver.py::test_kv_transfer_timeout_warns_once_per_request
- unittest/others/test_kv_cache_transceiver.py::test_kv_transfer_timeout_silent_when_unset
- unittest/_torch/pyexecutor/test_model_loader_mx.py
- unittest/_torch/pyexecutor/test_hang_detector_kill.py
- unittest/_torch/executor/test_model_loader_mx.py
- unittest/_torch/executor/test_hang_detector_kill.py
- condition:
ranges:
system_gpu_count:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
import typing
from dataclasses import fields

import pytest

from tensorrt_llm._torch.attention_backend.fmha.fallback import (
_THOP_EXCLUDED_FIELDS,
_THOP_LITERALS,
Expand Down Expand Up @@ -78,6 +80,7 @@
# The C++ attention() declaration is the single source of truth for kwarg
# names, ordering, and types.
_HEADER = pathlib.Path(__file__).resolve().parents[4] / ("cpp/tensorrt_llm/thop/attentionOp.h")
_THOP_SYNC_NVBUG = pytest.mark.skip(reason="https://nvbugs/6336801")


# ---- C++ declaration parser -------------------------------------------------
Expand Down Expand Up @@ -456,6 +459,7 @@ def test_each_source_attr_kwarg_resolves_uniquely():
)


@_THOP_SYNC_NVBUG
def test_attr_kwarg_names_match_source_leaf_attrs_except_allowlisted_aliases():
"""Most ``thop.attention`` kwargs should bind to a source attribute with
the same name. Existing aliases must stay explicit so new semantic
Expand Down Expand Up @@ -556,6 +560,7 @@ def _verify_consumed(cls, chains: set[tuple[str, ...]], excluded=frozenset()):
)


@_THOP_SYNC_NVBUG
def test_every_forward_args_field_is_consumed():
"""Recursively check that every dataclass field reachable from
``AttentionForwardArgs`` (including nested sub-bags such as
Expand Down
Loading
Loading