MCPcopy
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
116def context(input):
117 spec = tf.DeviceSpec.from_string(input.device)
118 return "/{}:{}".format(spec.device_type.lower(), spec.device_index)
119
120
121def device_type(ctx):

Callers 3

_scatter_ndFunction · 0.70
_gather_ndFunction · 0.70
syncFunction · 0.70

Calls 1

formatMethod · 0.80

Tested by

no test coverage detected