Skip to content

Commit bf203cb

Browse files
authored
[Fix] Suppress dynamo logging when using flashinfer backend with torch compile (#5992)
1 parent 8ebde73 commit bf203cb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

python/sglang/srt/layers/attention/flashinfer_backend.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@
1616
import torch
1717

1818
if os.environ["SGLANG_ENABLE_TORCH_COMPILE"] == "1":
19-
import torch._dynamo
19+
import logging
2020

21+
torch._logging.set_logs(dynamo=logging.ERROR)
2122
torch._dynamo.config.suppress_errors = True
2223

2324
from sglang.global_config import global_config

python/sglang/srt/layers/attention/flashinfer_mla_backend.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
import triton
1919

2020
if os.environ["SGLANG_ENABLE_TORCH_COMPILE"] == "1":
21-
import torch._dynamo
21+
import logging
2222

23+
torch._logging.set_logs(dynamo=logging.ERROR)
2324
torch._dynamo.config.suppress_errors = True
2425

2526
from sglang.global_config import global_config

0 commit comments

Comments
 (0)