From 9c0c1e30b26afe21c22f83c8a348756ce1962942 Mon Sep 17 00:00:00 2001 From: Qiaolin Yu Date: Fri, 22 Aug 2025 02:05:02 -0700 Subject: [PATCH] Disable torch.compile for get_last_loc_large_page_size_large_top_k (#9507) Co-authored-by: ispobock --- python/sglang/srt/speculative/eagle_worker.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/sglang/srt/speculative/eagle_worker.py b/python/sglang/srt/speculative/eagle_worker.py index cd26d3d04..4829fc83e 100644 --- a/python/sglang/srt/speculative/eagle_worker.py +++ b/python/sglang/srt/speculative/eagle_worker.py @@ -1017,7 +1017,9 @@ def get_last_loc_large_page_size_top_k_1( return prefix_lens, seq_lens, last_loc -@torch.compile(dynamic=True) +# Disable torch.compile for this function because it will be +# even slower. +# @torch.compile(dynamic=True) def get_last_loc_large_page_size_large_top_k( req_to_token: torch.Tensor, req_pool_indices: torch.Tensor,