diff --git a/cpp/tensorrt_llm/thop/moe/communication/moeAlltoAllOp.cpp b/cpp/tensorrt_llm/thop/moe/communication/moeAlltoAllOp.cpp index b4be9d9aa6a9..93b17d123a34 100644 --- a/cpp/tensorrt_llm/thop/moe/communication/moeAlltoAllOp.cpp +++ b/cpp/tensorrt_llm/thop/moe/communication/moeAlltoAllOp.cpp @@ -74,7 +74,7 @@ static constexpr size_t CACHELINE_ALIGNMENT = 128; // // The MoE all-to-all workspace setup used tensorrt_llm::mpi::MpiComm directly. // mpiUtils.h throws "MPI is disabled, DON'T USE MPI" whenever TLLM_DISABLE_MPI=1, -// which the Ray executor sets for every worker (executor/ray_executor.py), so the +// which the Ray executor sets for every worker (tensorrt_llm/executor/ray/executor.py), so the // NVLinkOneSided strategy always failed there and silently degraded to // NVLinkTwoSided. Route through the Torch process group in that case; the same // pattern is already used by cacheTransceiver / allreduceOp via pg_utils. diff --git a/tensorrt_llm/_torch/attention/backends/fp4_mla/cache_update.py b/tensorrt_llm/_torch/attention/backends/fp4_mla/cache_update.py index 47c80e861731..de869807805d 100644 --- a/tensorrt_llm/_torch/attention/backends/fp4_mla/cache_update.py +++ b/tensorrt_llm/_torch/attention/backends/fp4_mla/cache_update.py @@ -787,9 +787,7 @@ def scatter_fp4_mla_kv_cache( and ``positions[token_offset : token_offset + N]``. Callers must pass a latent_cache pre-sliced to the current phase (context or generation) so that ``shape[0]`` matches the number of index entries they intend to - consume. ``MLA.forward_impl`` (tensorrt_llm/_torch/modules/attention.py) - slices ``latent_cache[:num_ctx_tokens]`` for context and - ``latent_cache[num_ctx_tokens:]`` for generation before dispatching. + consume. Callers must pass ``phase``, ``local_layer``, and ``v_head_dim``. Context scatter writes the final FP4 tile representation directly. Dimensions diff --git a/tensorrt_llm/_torch/pyexecutor/kv_cache/mamba_cache_manager/mamba_cache_manager_v2.py b/tensorrt_llm/_torch/pyexecutor/kv_cache/mamba_cache_manager/mamba_cache_manager_v2.py index 518bd08ca37b..8b47da347877 100644 --- a/tensorrt_llm/_torch/pyexecutor/kv_cache/mamba_cache_manager/mamba_cache_manager_v2.py +++ b/tensorrt_llm/_torch/pyexecutor/kv_cache/mamba_cache_manager/mamba_cache_manager_v2.py @@ -93,7 +93,7 @@ ) if TYPE_CHECKING: - from tensorrt_llm._torch.attention_backend.interface import AttentionMetadata + from tensorrt_llm._torch.attention.backends.interface import AttentionMetadata from tensorrt_llm.llmapi.llm_args import DecodingBaseConfig from tensorrt_llm.sampling_params import SamplingParams diff --git a/tensorrt_llm/_torch/speculative/dflash.py b/tensorrt_llm/_torch/speculative/dflash.py index b2bd10c8fb2b..5e57da4634b7 100644 --- a/tensorrt_llm/_torch/speculative/dflash.py +++ b/tensorrt_llm/_torch/speculative/dflash.py @@ -1277,7 +1277,8 @@ def _init_ctx_block_tables( ``kv_cache_block_offsets`` entries are ``pool_block_index * num_pool_layers * kv_factor`` plus the K/V field index. What that has to be divided by to index a ``get_buffers`` view depends on the manager -- - see the stride check below; attention_backend/utils.py hardcodes the V1 + see the stride check below; + ``append_mla_latent_cache_generation_cuda_graph_safe`` hardcodes the V1 divisor and is not a general contract. """ mgr = draft_kv_cache_manager diff --git a/tests/unittest/_torch/ray_orchestrator/multi_gpu/test_mnnvl_allreduce.py b/tests/unittest/_torch/ray_orchestrator/multi_gpu/test_mnnvl_allreduce.py index ac9da13a1dda..9222fce91c02 100644 --- a/tests/unittest/_torch/ray_orchestrator/multi_gpu/test_mnnvl_allreduce.py +++ b/tests/unittest/_torch/ray_orchestrator/multi_gpu/test_mnnvl_allreduce.py @@ -32,7 +32,7 @@ try: import ray except ModuleNotFoundError: - from tensorrt_llm import ray_stub as ray + from tensorrt_llm.executor.ray import stub as ray from tensorrt_llm._torch.distributed.communicator import TorchDist from tensorrt_llm.functional import AllReduceFusionOp, AllReduceStrategy @@ -60,7 +60,7 @@ def __init__(self, rank: int, world_size: int): assert len(ray.get_gpu_ids()) == 1 self.gpu = int(ray.get_gpu_ids()[0]) - from tensorrt_llm.executor.ray_gpu_worker import RayWorkerWrapper + from tensorrt_llm.executor.ray.gpu_worker import RayWorkerWrapper torch.cuda.set_device(RayWorkerWrapper.physical_to_local_id(self.gpu)) diff --git a/tests/unittest/_torch/ray_orchestrator/multi_gpu/test_refit_compile_isolation.py b/tests/unittest/_torch/ray_orchestrator/multi_gpu/test_refit_compile_isolation.py index 40fc2674b546..0d737b90de99 100644 --- a/tests/unittest/_torch/ray_orchestrator/multi_gpu/test_refit_compile_isolation.py +++ b/tests/unittest/_torch/ray_orchestrator/multi_gpu/test_refit_compile_isolation.py @@ -92,8 +92,8 @@ from utils.util import skip_pre_rubin from tensorrt_llm import LLM -from tensorrt_llm._ray_utils import control_action_decorator from tensorrt_llm._torch.utils import get_device_uuid +from tensorrt_llm.executor.ray.utils import control_action_decorator from tensorrt_llm.llmapi import KvCacheConfig, MoeConfig, SamplingParams, TorchCompileConfig from tensorrt_llm.llmapi.rlhf_utils import WorkerExtension