The TB summary writer for the Graph is just going to enable this:

  

      github.com
  

  
    tensorflow/tensorflow/blob/master/tensorflow/python/eager/context.py#L1821



      
      
              enable: A boolean to set whether to use TFRT distributed runtime.
            """
            if not isinstance(enable, bool):
              raise ValueError("Expecting a boolean but got %s" % type(enable))
          
          
  if self._use_tfrt_distributed_runtime != enable:
              if self._initialized:
                raise ValueError("use_tfrt should be set before being initialized.")
              self._use_tfrt_distributed_runtime = enable
          
          
def enable_run_metadata(self):
            """Enables tracing of op execution via RunMetadata.
          
          
  To retrieve the accumulated metadata call context.export_run_metadata()
            and to stop tracing call context.disable_run_metadata().
            """
            self.ensure_initialized()
            pywrap_tfe.TFE_ContextEnableRunMetadata(self._handle)
          
          
def disable_run_metadata(self):
            """Disables tracing of op execution via RunMetadata."""
      
    
  


  

  
    
    
  

  


Check also:
  

      github.com
  

  
    tensorflow/tensorflow/blob/master/tensorflow/python/ops/summary_ops_v2.py#L1217



      
      
              with ops.device("cpu:0"):
                tensor = constant_op.constant(data.SerializeToString(),
                                              dtype=dtypes.string)
              return write(
                  tag=tag,
                  tensor=tensor,
                  step=step,
                  metadata=summary_metadata)
          
          

          
def run_metadata_graphs(name, data, step=None):
            """Writes graphs from a RunMetadata summary.
          
          
  Args:
              name: A name for this summary. The summary tag used for TensorBoard will be
                this name prefixed by any active name scopes.
              data: A RunMetadata proto to write.
              step: Explicit `int64`-castable monotonic step value for this summary. If
                omitted, this defaults to `tf.summary.experimental.get_step()`, which must
                not be None.
          
      

    
  


  

  
    
    
  

  


And see the RunMetaData protobuf message if you wan to parse the file:

  

      github.com
  

  
    tensorflow/tensorflow/blob/master/tensorflow/core/protobuf/config.proto#L755



      
      
              }
              RunHandlerPoolOptions run_handler_pool_options = 3;
            }
          
          
  Experimental experimental = 8;
          
          
  reserved 4;
          }
          
          
// Metadata output (i.e., non-Tensor) for a single Run() call.
          message RunMetadata {
            // Statistics traced for this step. Populated if tracing is turned on via the
            // "RunOptions" proto.
            // EXPERIMENTAL: The format and set of events may change in future versions.
            StepStats step_stats = 1;
          
          
  // The cost graph for the computation defined by the run call.
            CostGraphDef cost_graph = 2;
          
          
  // Graphs of the partitions executed by executors.
            repeated GraphDef partition_graphs = 3;