message: add traceme for graph build to compute overhead associate with tf.function invocation. since this is not a hot path (hopefully), adding a TraceMe (<0.3us) when disabled should not be a problem.
diff: @@ -3324,17 +3324,20 @@ class Function(object):
  return graph_function, filtered_flat_args
  with monitoring.MonitoredTimer(_graph_building_time_counter.get_cell()):
  - logging.vlog(1, "Creating new FuncGraph for Python function %r (key: %r)",
  + with trace.Trace("tf.function-graph_building"):
  + logging.vlog(1,
  + "Creating new FuncGraph for Python function %r (key: %r)",
  self._python_function, cache_key)
  - logging.vlog(2, "Python function signature [args: %s] [kwargs: %s]", args,
  - kwargs)
  + logging.vlog(2, "Python function signature [args: %s] [kwargs: %s]",
  + args, kwargs)
  # pylint: disable=protected-access
  call_context_key = cache_key._replace(input_signature=None)
  # pylint: disable=protected-access
  ag_status = (
  - ag_ctx.Status.ENABLED if self._autograph else ag_ctx.Status.DISABLED)
  + ag_ctx.Status.ENABLED
  + if self._autograph else ag_ctx.Status.DISABLED)
  with ag_ctx.ControlStatusCtx(
  status=ag_status, options=self._autograph_options):
  @@ -3342,7 +3345,8 @@ class Function(object):
  # 1. shape relaxation is explicitly enabled
  # and 2. there's no provided input signature
  # and 3. there's been a cache miss for this calling context
  - if (self._experimental_relax_shapes and self.input_signature is None and
  + if (self._experimental_relax_shapes and
  + self.input_signature is None and
  call_context_key in self._function_cache.missed):
  return self._define_function_with_shape_relaxation(
  args, kwargs, flat_args, filtered_flat_args, cache_key_context)
  