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

Method _set_device

tensorflow/python/framework/ops.py:2001–2007  ·  view source on GitHub ↗

Set the device of this operation. Args: device: string or device.. The device to set.

(self, device)

Source from the content-addressed store, hash-verified

1999 return tf_input
2000
2001 def _set_device(self, device): # pylint: disable=redefined-outer-name
2002 """Set the device of this operation.
2003
2004 Args:
2005 device: string or device.. The device to set.
2006 """
2007 self._set_device_from_string(compat.as_str(_device_string(device)))
2008
2009 def _set_device_from_string(self, device_str):
2010 """Fast path to set device if the type is known to be a string.

Callers 4

copy_op_to_graphFunction · 0.95
testDeviceObjectMethod · 0.95
_ProcessNewOpsFunction · 0.45
_create_op_helperMethod · 0.45

Calls 2

_device_stringFunction · 0.85

Tested by 1

testDeviceObjectMethod · 0.76