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

Method cuda

colossalai/lazy/lazy_init.py:387–389  ·  view source on GitHub ↗
(self, device=None, non_blocking=False, memory_format: torch.memory_format = torch.preserve_format)

Source from the content-addressed store, hash-verified

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")
389 return self.to(device=device, non_blocking=non_blocking, memory_format=memory_format)
390
391 def clone(self) -> "LazyTensor":
392 def factory_fn(t: torch.Tensor, **kw):

Callers 15

generate_no_streamFunction · 0.45
server.pyFile · 0.45
generate_answerMethod · 0.45
model_fnFunction · 0.45
trainer_model_fnFunction · 0.45
model_fnFunction · 0.45
trainer_model_fnFunction · 0.45
__init__Method · 0.45
mainFunction · 0.45
init_param_dataMethod · 0.45
_cast_buffersMethod · 0.45

Calls 2

toMethod · 0.95
deviceMethod · 0.45

Tested by 15

run_dist_lamb_fwd_bwdFunction · 0.36
move_some_params_to_cudaFunction · 0.36
run_dist_galore_fwd_bwdFunction · 0.36
check_layerFunction · 0.36
check_layerFunction · 0.36
run_tm_forwardFunction · 0.36
run_gpt_forwardFunction · 0.36
test_meta_info_propFunction · 0.36
test_gpt_meta_info_propFunction · 0.36
_run_offload_codegenFunction · 0.36