MCPcopy Create free account
hub / github.com/MoonshotAI/checkpoint-engine / _get_physical_gpu_id

Function _get_physical_gpu_id

checkpoint_engine/ps.py:51–58  ·  view source on GitHub ↗
(device_manager: DeviceManager, device_index: int | None = None)

Source from the content-addressed store, hash-verified

49
50
51def _get_physical_gpu_id(device_manager: DeviceManager, device_index: int | None = None) -> str:
52 try:
53 if device_manager.device_type == "npu":
54 return f"NPU-{npu_generate_uuid()}"
55 else:
56 return f"GPU-{device_manager.device_module.get_device_properties(device_index).uuid!s}"
57 except AssertionError as e:
58 raise ValueError(f"fail to get physical gpu id {device_index}") from e
59
60
61def _gen_h2d_buckets(

Callers 3

runFunction · 0.90
run_with_filesFunction · 0.90
__init__Method · 0.85

Calls 1

npu_generate_uuidFunction · 0.90

Tested by 2

runFunction · 0.72
run_with_filesFunction · 0.72