[BugFix] fix gpt-oss accuracy issue when enabling piecewise cuda graph (#18013)
This commit is contained in:
@@ -2283,6 +2283,15 @@ class ScheduleBatch(ScheduleBatchDisaggregationDecodeMixin):
|
||||
def maybe_evict_swa(self):
|
||||
if self.tree_cache.supports_swa():
|
||||
sliding_window_size = self.tree_cache.sliding_window_size
|
||||
server_args = get_global_server_args()
|
||||
|
||||
if (
|
||||
self.forward_mode.is_decode()
|
||||
and server_args.enable_piecewise_cuda_graph
|
||||
and not self.tree_cache.is_chunk_cache()
|
||||
):
|
||||
return
|
||||
|
||||
for idx, req in enumerate(self.reqs):
|
||||
if self.forward_mode.is_decode():
|
||||
# We set evict_swa condition here with two reasons:
|
||||
@@ -2297,7 +2306,6 @@ class ScheduleBatch(ScheduleBatchDisaggregationDecodeMixin):
|
||||
if req.extend_batch_idx < 2:
|
||||
continue
|
||||
else:
|
||||
server_args = get_global_server_args()
|
||||
pre_len = (
|
||||
pre_len - server_args.chunked_prefill_size
|
||||
if server_args.chunked_prefill_size > 0
|
||||
|
||||
Reference in New Issue
Block a user