Remove redundant type conversion (#4513)

This commit is contained in:
Lianmin Zheng
2025-03-17 05:57:35 -07:00
committed by GitHub
parent 5f9b2c62ff
commit 82dec1f70b
6 changed files with 16 additions and 10 deletions

View File

@@ -1008,7 +1008,7 @@ class FlashInferMultiStepDraftBackend:
global_override_indptr_cpu = None
def init_forward_metadata(self, forward_batch: ForwardBatch):
kv_indices = torch.zeros(
kv_indices = torch.empty(
(
self.speculative_num_steps,
forward_batch.batch_size * self.topk * self.max_context_len,