warmup and allocate
This commit is contained in:
@@ -63,7 +63,8 @@ class Attention(nn.Module):
|
||||
context = get_context()
|
||||
k_cache = self.k_cache
|
||||
v_cache = self.v_cache
|
||||
store_kvcache(k, v, k_cache, v_cache, context.slot_mapping)
|
||||
if k_cache.numel() and v_cache.numel():
|
||||
store_kvcache(k, v, k_cache, v_cache, context.slot_mapping)
|
||||
if context.is_prefill:
|
||||
if context.block_tables is not None: # prefix cache
|
||||
k, v = k_cache, v_cache
|
||||
|
||||
Reference in New Issue
Block a user