From d8ece7fb22a63f9595ca3b162fe31974bfa5999a Mon Sep 17 00:00:00 2001 From: Yuwei An Date: Thu, 19 Mar 2026 13:20:49 -0700 Subject: [PATCH] [Tiny Fix] Filter lru related warning with pcg (#20940) Signed-off-by: yuweia --- .../sglang/srt/model_executor/piecewise_cuda_graph_runner.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/sglang/srt/model_executor/piecewise_cuda_graph_runner.py b/python/sglang/srt/model_executor/piecewise_cuda_graph_runner.py index a7f6840d3..18fc12785 100644 --- a/python/sglang/srt/model_executor/piecewise_cuda_graph_runner.py +++ b/python/sglang/srt/model_executor/piecewise_cuda_graph_runner.py @@ -18,6 +18,7 @@ from __future__ import annotations import bisect import gc import logging +import warnings from contextlib import contextmanager from dataclasses import dataclass from typing import TYPE_CHECKING, Optional, Union @@ -59,6 +60,8 @@ from sglang.srt.model_executor.forward_batch_info import ( from sglang.srt.model_executor.input_buffers import ForwardInputBuffers from sglang.srt.utils import get_available_gpu_memory, is_npu, log_info_on_rank0 +# Suppress Dynamo warning about tracing through lru_cache-wrapped functions (e.g., is_arch_support_pdl). +warnings.filterwarnings("ignore", message=".*lru_cache.*", module="torch._dynamo") logger = logging.getLogger(__name__) if TYPE_CHECKING: