MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / get_local_device_id

Function get_local_device_id

imperative/python/megengine/distributed/group.py:206–208  ·  view source on GitHub ↗

r"""Get the hardware ID of the current process.

()

Source from the content-addressed store, hash-verified

204
205
206def get_local_device_id() -> int:
207 r"""Get the hardware ID of the current process."""
208 return _sd.device if _sd is not None else 0
209
210
211def get_world_size() -> int:

Callers 2

compileMethod · 0.85
build_xlaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected