diff --git a/tensorrt_llm/_torch/pyexecutor/resource_manager.py b/tensorrt_llm/_torch/pyexecutor/resource_manager.py index 8f46d88794cd..c5096763aaf5 100644 --- a/tensorrt_llm/_torch/pyexecutor/resource_manager.py +++ b/tensorrt_llm/_torch/pyexecutor/resource_manager.py @@ -7,7 +7,7 @@ import os from abc import ABC, abstractmethod from collections import OrderedDict, defaultdict, deque -from dataclasses import dataclass +from dataclasses import dataclass, replace from typing import (TYPE_CHECKING, Dict, Iterable, List, NamedTuple, Optional, Sequence, Set, Tuple, Union) @@ -680,6 +680,18 @@ def append_to_kv_heads_per_layer(num_kv_heads_per_layer: List[int], layer_mask=layer_mask, ) + # _resolve_max_attention_window_vec clamps each window to max_seq_len (a + # sliding window wider than the sequence never slides, so it degenerates + # to full attention). Mirror that clamp onto the per-pool window_size so + # pool keys stay consistent with max_attention_window_vec; otherwise + # _build_layer_to_pool_idx can't map a layer whose window was clamped + # down (e.g. Ministral sliding_window=32768 with max_seq_len=512). + if self.pool_configurations: + self.pool_configurations = [ + replace(pc, window_size=min(pc.window_size, self.max_seq_len)) + for pc in self.pool_configurations + ] + # Now that max_attention_window_vec is known, build layer -> pool_idx # from the (pre-clamp) pool_configurations. Stays valid through the # window clamping below because that only rewrites per-pool diff --git a/tests/integration/test_lists/waives.txt b/tests/integration/test_lists/waives.txt index 8ec46b10e0c9..4cceb4a4205a 100644 --- a/tests/integration/test_lists/waives.txt +++ b/tests/integration/test_lists/waives.txt @@ -14,7 +14,6 @@ accuracy/test_llm_api_autodeploy.py::TestGemma4MoE::test_bf16 SKIP (https://nvbu accuracy/test_llm_api_autodeploy.py::TestGemmaE2B::test_gemma4_e2b_it SKIP (https://nvbugs/6194934) accuracy/test_llm_api_autodeploy.py::TestMiniMaxM2::test_finegrained_fp8 SKIP (https://nvbugs/6158397) accuracy/test_llm_api_autodeploy.py::TestModelRegistryAccuracy::test_autodeploy_from_registry[google_gemma-3-1b-it-False] SKIP (https://nvbugs/6248764) -accuracy/test_llm_api_autodeploy.py::TestModelRegistryAccuracy::test_autodeploy_from_registry[mistralai_Ministral-8B-Instruct-2410-False] SKIP (https://nvbugs/6248769) accuracy/test_llm_api_autodeploy.py::TestModelRegistryAccuracy::test_autodeploy_from_registry[nvidia_Llama-3.1-8B-Instruct-NVFP4-True] SKIP (https://nvbugs/6245279) accuracy/test_llm_api_autodeploy.py::TestNemotronNanoV3::test_accuracy[nvfp4-1-trtllm] SKIP (https://nvbugs/6200112) accuracy/test_llm_api_autodeploy.py::TestNemotronUltraV3::test_accuracy[nvfp4-8] SKIP (https://nvbugs/6248757)