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

Function initialize_system_for_tpu_embedding

tensorflow/python/tpu/tpu.py:112–135  ·  view source on GitHub ↗

Initializes a distributed TPU Embedding system for use with TensorFlow. The following two are equivalent: 1. initialize_system() with embedding_config. 2. initialize_system() without embedding_config, then initialize_system_for_tpu_embedding(). initialize_system() should not be called

(embedding_config, job=None)

Source from the content-addressed store, hash-verified

110
111
112def initialize_system_for_tpu_embedding(embedding_config, job=None):
113 """Initializes a distributed TPU Embedding system for use with TensorFlow.
114
115 The following two are equivalent:
116 1. initialize_system() with embedding_config.
117 2. initialize_system() without embedding_config, then
118 initialize_system_for_tpu_embedding().
119 initialize_system() should not be called with embedding_config if
120 initialize_system_for_tpu_embedding() is meant to be called later.
121
122 Args:
123 embedding_config: a `TPUEmbeddingConfiguration` proto describing the desired
124 configuration of the hardware embedding lookup tables.
125 job: The job (the XXX in TensorFlow device specification /job:XXX) that
126 contains the TPU devices that will be initialized. If job=None it is
127 assumed there is only one job in the TensorFlow flock, and an error will
128 be returned if this assumption does not hold.
129
130 Returns:
131 A no-op.
132 """
133 config_string = embedding_config.SerializeToString()
134 with ops.device(_tpu_system_device_name(job)):
135 return tpu_ops.configure_tpu_embedding(config=config_string)
136
137
138@tf_export(v1=["tpu.shutdown_system"])

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