Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/deepspeedai/DeepSpeed
/ current_device
Method
current_device
accelerator/cpu_accelerator.py:204–205 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
202
return
203
204
def
current_device(self):
205
return
os.environ.get(
'LOCAL_RANK'
, 0)
206
207
def
current_device_name(self):
208
return
'cpu'
Callers
nothing calls this directly
Calls
1
get
Method · 0.45
Tested by
no test coverage detected