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

Method cpu

colossalai/lazy/lazy_init.py:384–385  ·  view source on GitHub ↗
(self, memory_format: torch.memory_format = torch.preserve_format)

Source from the content-addressed store, hash-verified

382 return LazyTensor(factory_fn, self, meta_data=meta_data, device=device)
383
384 def cpu(self, memory_format: torch.memory_format = torch.preserve_format):
385 return self.to(device=torch.device("cpu"), memory_format=memory_format)
386
387 def cuda(self, device=None, non_blocking=False, memory_format: torch.memory_format = torch.preserve_format):
388 device = torch.device(device or "cuda")

Callers 15

generate_streaminglyFunction · 0.45
generate_no_streamFunction · 0.45
_trainMethod · 0.45
_evalMethod · 0.45
__init__Method · 0.45
make_experienceMethod · 0.45
__call__Method · 0.45
_calculate_lossMethod · 0.45
generateMethod · 0.45
_calculate_lossMethod · 0.45
generateMethod · 0.45
generateFunction · 0.45

Calls 2

toMethod · 0.95
deviceMethod · 0.45

Tested by 11

test_meta_info_propFunction · 0.36
test_gpt_meta_info_propFunction · 0.36
test_lazy_opsFunction · 0.36
numpy_allcloseFunction · 0.36
numpy_allcloseFunction · 0.36
numpy_allcloseFunction · 0.36
numpy_equalFunction · 0.36
solver_testFunction · 0.36