MCPcopy Create free account
hub / github.com/tensorflow/models / get_runtime_options

Function get_runtime_options

official/core/base_trainer.py:126–133  ·  view source on GitHub ↗

Get tf.distribute.RunOptions from config.

(config: ExperimentConfig)

Source from the content-addressed store, hash-verified

124
125
126def get_runtime_options(config: ExperimentConfig):
127 """Get tf.distribute.RunOptions from config."""
128 xla_options = {}
129 if config.runtime.tpu_enable_xla_dynamic_padder is not None:
130 xla_options["enable_xla_dynamic_padder"] = (
131 config.runtime.tpu_enable_xla_dynamic_padder)
132 return tf.distribute.RunOptions(
133 experimental_xla_options=tf.tpu.XLAOptions(**xla_options))
134
135
136@gin.configurable

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected