Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DeepRec-AI/DeepRec
/ use_gpu
Function
use_gpu
tensorflow/python/framework/test_util.py:1463–1466 ·
view source on GitHub ↗
Uses gpu when requested and available.
()
Source
from the content-addressed store, hash-verified
1461
1462
@contextlib.contextmanager
1463
def
use_gpu():
1464
""
"Uses gpu when requested and available."
""
1465
with
device(use_gpu=True):
1466
yield
1467
1468
1469
@contextlib.contextmanager
Callers
nothing calls this directly
Calls
1
device
Function · 0.70
Tested by
no test coverage detected