MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _check_device

Function _check_device

tensorflow/python/ops/nccl_ops.py:263–267  ·  view source on GitHub ↗
(tensor, expected=None)

Source from the content-addressed store, hash-verified

261
262
263def _check_device(tensor, expected=None):
264 if not device.canonical_name(tensor.device):
265 raise ValueError('Device assignment required for nccl collective ops')
266 if expected and expected != tensor.device:
267 raise ValueError('Expected device %s, got %s' % (expected, tensor.device))

Callers 6

_all_sum_gradFunction · 0.85
_reduce_sum_gradFunction · 0.85
broadcastFunction · 0.85
_broadcast_gradFunction · 0.85
_all_reduceFunction · 0.85
_apply_reduceFunction · 0.85

Calls 1

canonical_nameMethod · 0.80

Tested by

no test coverage detected