parameters: (graph_def)
return_statement: return device_name
docstring: Infer device name from a partition GraphDef.
docstring_summary: Infer device name from a partition GraphDef.
docstring_tokens: Infer device name from a partition GraphDef .
function: def _infer_device_name(graph_def):
    """Infer device name from a partition GraphDef."""
    device_name = None
    for node in graph_def.node:
      if node.device:
        device_name = node.device
        break
    if device_name is None:
      logging.warn(
          "Failed to infer device name from partition GraphDef: none of the "
          "nodes of the GraphDef has a non-empty device name.")
    return device_name
function_tokens: def _infer_device_name ( graph_def ) : device_name = None for node in graph_def . node : if node . device : device_name = node . device break if device_name is None : logging . warn ( "Failed to infer device name from partition GraphDef: none of the " "nodes of the GraphDef has a non-empty device name." ) return device_name