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)
| 110 | |
| 111 | |
| 112 | def 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"]) |
nothing calls this directly
no test coverage detected