Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/dmlc/dgl
/ context
Function
context
python/dgl/backend/tensorflow/tensor.py:116–118 ·
view source on GitHub ↗
(input)
Source
from the content-addressed store, hash-verified
114
115
116
def
context(input):
117
spec = tf.DeviceSpec.from_string(input.device)
118
return
"/{}:{}"
.format(spec.device_type.lower(), spec.device_index)
119
120
121
def
device_type(ctx):
Callers
3
_scatter_nd
Function · 0.70
_gather_nd
Function · 0.70
sync
Function · 0.70
Calls
1
format
Method · 0.80
Tested by
no test coverage detected