Repository: tensorflow
Issue: Unable to log scalar summaries in XLA
Labels: comp:tensorboard,stat:awaiting tensorflower,type:bug,comp:xla,TF 2.11

**System information**
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow): yes
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): macOS 10.15.5 Beta
- Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: n/a
- TensorFlow installed from (source or binary): binary
- TensorFlow version (use command below): 2.2.0
- Python version: 3.8.2
- Bazel version (if compiling from source): n/a
- GCC/Compiler version (if compiling from source): n/a
- CUDA/cuDNN version: n/a
- GPU model and memory: n/a

**Describe the current behavior**
Forcing XLA compilation via `experimental_compile=True` in a `tf.function` raises `tensorflow.python.framework.errors_impl.InvalidArgumentError` when the function contains `tf.summary.scalar` (I haven't tried other summaries). 

**Describe the expected behavior**
Passing `experimental_compile=True` should log the scalar without raising any errors. 

**Standalone code to reproduce the issue**
```python
import tensorflow as tf


@tf.function(
    experimental_compile=True,
)
def test_summaries():
    tf.summary.scalar('testing', 12.3)

with tf.summary.create_file_writer('./logs').as_default():
    tf.summary.experimental.set_step(0)
    test_summaries()
```

**Other info / logs**
```
2020-05-22 22:30:57.072264: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-05-22 22:30:57.091548: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7f99eef80060 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-05-22 22:30:57.091590: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
Traceback (most recent call last):
  File "testsum.py", line 12, in <module>
    test_summaries()
  File "/private/tmp/venv/lib/python3.8/site-packages/tensorflow/python/eager/def_function.py", line 576, in __call__
    result = self._call(*args, **kwds)
  File "/private/tmp/venv/lib/python3.8/site-packages/tensorflow/python/eager/def_function.py", line 650, in _call
    return self._concrete_stateful_fn._filtered_call(canon_args, canon_kwds)  # pylint: disable=protected-access
  File "/private/tmp/venv/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1661, in _filtered_call
    return self._call_flat(
  File "/private/tmp/venv/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1745, in _call_flat
    return self._build_call_outputs(self._inference_function.call(
  File "/private/tmp/venv/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 593, in call
    outputs = execute.execute(
  File "/private/tmp/venv/lib/python3.8/site-packages/tensorflow/python/eager/execute.py", line 59, in quick_execute
    tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.InvalidArgumentError: Function invoked by the following node is not compilable: {{node __inference_test_summaries_22}} = __inference_test_summaries_22[_XlaMustCompile=true, config_proto="\n\007\n\003GPU\020\000\n\007\n\003CPU\020\0012\002J\0008\001", executor_type=""](dummy_input).
Uncompilable nodes:
testing/write_summary/tag: unsupported op: Const op with type DT_STRING is not supported by XLA.
	Stacktrace:
		Node: __inference_test_summaries_22, function: 
		Node: testing/write_summary/tag, function: __inference_test_summaries_22

testing/write_summary/summary_metadata: unsupported op: Const op with type DT_STRING is not supported by XLA.
	Stacktrace:
		Node: __inference_test_summaries_22, function: 
		Node: testing/write_summary/summary_metadata, function: __inference_test_summaries_22

testing/write_summary: unsupported op: No registered 'WriteSummary' OpKernel for XLA_CPU_JIT devices compatible with node {{node testing/write_summary}}
	Stacktrace:
		Node: __inference_test_summaries_22, function: 
		Node: testing/write_summary, function: __inference_test_summaries_22
 [Op:__inference_test_summaries_22]
```