MCPcopy Create free account
hub / github.com/MLSysU/TD-Pipe / copy

Method copy

TD_Pipe/worker/cache_engine.py:150–154  ·  view source on GitHub ↗
(self, src_to_dsts: Dict[int, List[int]])

Source from the content-addressed store, hash-verified

148 self._swap(self.gpu_cache, self.cpu_cache, src_to_dst)
149
150 def copy(self, src_to_dsts: Dict[int, List[int]]) -> None:
151 key_caches = [key_cache for key_cache, _ in self.gpu_cache]
152 value_caches = [value_cache for _, value_cache in self.gpu_cache]
153 # NOTE(woosuk): This operation implicitly synchronizes the CPU and GPU.
154 cache_ops.copy_blocks(key_caches, value_caches, src_to_dsts)
155
156 @staticmethod
157 def get_cache_block_size(

Callers 5

setup.pyFile · 0.80
allocateMethod · 0.80
forkMethod · 0.80
cache_swapMethod · 0.80
__getstate__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected