Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
206
def
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
211
def
get_world_size() -> int:
Callers
2
compile
Method · 0.85
build_xla
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected