Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/apache/singa
/ get_num_gpus
Function
get_num_gpus
python/singa/device.py:29–31 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
27
28
29
def
get_num_gpus():
30
assert singa.USE_CUDA,
'SINGA has not been compiled with CUDA enabled.'
31
return
singa.Platform.GetNumGPUs()
32
33
34
def
get_gpu_ids():
Callers
nothing calls this directly
Calls
1
GetNumGPUs
Method · 0.80
Tested by
no test coverage detected