MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / insert_tensor

Method insert_tensor

deepspeed/runtime/swap_tensor/utils.py:115–120  ·  view source on GitHub ↗
(self, tensor, swap_path, aligned_numel)

Source from the content-addressed store, hash-verified

113 return None, None
114
115 def insert_tensor(self, tensor, swap_path, aligned_numel):
116 if self.has_space(aligned_numel):
117 swap_tensor, compute_tensor = self._get_current_buffer().insert_tensor(tensor, swap_path, aligned_numel)
118 return swap_tensor, compute_tensor
119
120 return None, None
121
122 def get_swap_tensors(self):
123 swap_tensors = []

Callers

nothing calls this directly

Calls 3

has_spaceMethod · 0.95
_get_current_bufferMethod · 0.95
insert_tensorMethod · 0.45

Tested by

no test coverage detected