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

Function initialize_system

tensorflow/python/tpu/tpu.py:91–109  ·  view source on GitHub ↗

Initializes a distributed TPU system for use with TensorFlow. Args: embedding_config: If not None, a `TPUEmbeddingConfiguration` proto describing the desired configuration of the hardware embedding lookup tables. If embedding_config is None, no hardware embeddings can be used.

(embedding_config=None, job=None)

Source from the content-addressed store, hash-verified

89
90@tf_export(v1=["tpu.initialize_system"])
91def initialize_system(embedding_config=None, job=None):
92 """Initializes a distributed TPU system for use with TensorFlow.
93
94 Args:
95 embedding_config: If not None, a `TPUEmbeddingConfiguration` proto
96 describing the desired configuration of the hardware embedding lookup
97 tables. If embedding_config is None, no hardware embeddings can be used.
98 job: The job (the XXX in TensorFlow device specification /job:XXX) that
99 contains the TPU devices that will be initialized. If job=None it is
100 assumed there is only one job in the TensorFlow flock, and an error will
101 be returned if this assumption does not hold.
102 Returns:
103 A serialized `TopologyProto` that describes the TPU system. Note:
104 the topology must be evaluated using `Session.run` before it can be used.
105 """
106 config_string = ("" if embedding_config is None else
107 embedding_config.SerializeToString())
108 with ops.device(_tpu_system_device_name(job)):
109 return tpu_ops.configure_distributed_tpu(embedding_config=config_string)
110
111
112def initialize_system_for_tpu_embedding(embedding_config, job=None):

Callers

nothing calls this directly

Calls 3

_tpu_system_device_nameFunction · 0.85
SerializeToStringMethod · 0.45
deviceMethod · 0.45

Tested by

no test coverage detected