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

Method device

colossalai/lazy/lazy_init.py:204–205  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

202
203 @property
204 def device(self) -> torch.device:
205 return self._materialized_data.device if self._materialized_data is not None else self._device
206
207 def __repr__(self):
208 return f"LazyTensor(..., size={tuple(self.shape)}, device='{self.device}', dtype={self.dtype})"

Callers 15

get_gpu_memoryFunction · 0.45
state_dict_toFunction · 0.45
__init__Method · 0.45
appendMethod · 0.45
mainFunction · 0.45
_current_deviceFunction · 0.45
_default_deviceFunction · 0.45
__new__Method · 0.45
unwrapMethod · 0.45
__torch_dispatch__Method · 0.45
replaceMethod · 0.45
_newMethod · 0.45

Calls

no outgoing calls

Tested by 15

test_cpu_adam_kernelFunction · 0.36
test_torchvision_modelsFunction · 0.36
test_timm_modelsFunction · 0.36
test_timm_models_traceFunction · 0.36
assert_codegen_runFunction · 0.36
assert_codegen_runFunction · 0.36
assert_codegen_runFunction · 0.36
assert_codegen_runFunction · 0.36
test_reorder_with_freqFunction · 0.36
test_freq_aware_embedFunction · 0.36