MCPcopy
hub / github.com/hpcaitech/ColossalAI / clear

Method clear

colossalai/inference/kv_cache/block_cache.py:53–55  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

51 return self.allocated_size < 1
52
53 def clear(self) -> None:
54 self.ref_count = 0
55 self.allocated_size = 0
56
57 def __repr__(self):
58 return f"CacheBlock#{self.block_id}(ref#{self.ref_count}, allocated#{self.allocated_size})"

Callers 4

clear_allMethod · 0.45
get_new_requestsMethod · 0.45
init_workersMethod · 0.45
updateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected