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

Method device_count

colossalai/accelerator/cpu_accelerator.py:69–73  ·  view source on GitHub ↗

Return the number of devices on the machine.

(self)

Source from the content-addressed store, hash-verified

67 return True
68
69 def device_count(self):
70 """
71 Return the number of devices on the machine.
72 """
73 raise RuntimeError("this method is not supported for cpu accelerator")
74
75 def get_device_capability(self, device=None) -> Tuple[int, int]:
76 """

Callers 11

get_gpu_memoryFunction · 0.45
set_deviceMethod · 0.45
initializeMethod · 0.45
log_cuda_infoFunction · 0.45
log_cuda_infoFunction · 0.45
_check_argumentMethod · 0.45
__init__Method · 0.45
_execute_by_gpu_numFunction · 0.45
test_fsdpFunction · 0.45

Calls

no outgoing calls

Tested by 1

test_fsdpFunction · 0.36