google.protobuf.message.DecodeError: Error parsing message when using hlo_pb2.HloModeuleProto
there are a couple of bugs or typos in your code

In line 8, instead of `tf.compat.v1.global_variables_initalizer()`, it should be `tf.compat.v1.global_variables_initializer()` (notice the typo in 'initializer').
 > there are a couple of bugs or typos in your code
> 
> In line 8, instead of `tf.compat.v1.global_variables_initalizer()`, it should be `tf.compat.v1.global_variables_initializer()` (notice the typo in 'initializer').

Ok, thanks for the warning @songh11, Apologies for the delay. I was able to replicate the issue in Colab using TF v2.12. Please find the gist [here](https://colab.sandbox.google.com/gist/synandi/9e55948a51ef30cffae02aa4165d53ab/untitled363.ipynb). 

It seems like you're trying to load a TensorFlow SavedModel and parse the contents of the .pb file using the hlo_pb2.HloModuleProto class from the XLA module.

Please note that the `hlo_pb2.HloModuleProto` class is specifically designed for parsing HLO (High-Level Operator) module protos used in XLA, and it may not be compatible with the .pb file, which contains a serialized TensorFlow GraphDef or MetaGraphDef.
Thank you!   > @songh11, Apologies for the delay. I was able to replicate the issue in Colab using TF v2.12. Please find the gist [here](https://colab.sandbox.google.com/gist/synandi/9e55948a51ef30cffae02aa4165d53ab/untitled363.ipynb).
> 
> It seems like you're trying to load a TensorFlow SavedModel and parse the contents of the .pb file using the hlo_pb2.HloModuleProto class from the XLA module.
> 
> Please note that the `hlo_pb2.HloModuleProto` class is specifically designed for parsing HLO (High-Level Operator) module protos used in XLA, and it may not be compatible with the .pb file, which contains a serialized TensorFlow GraphDef or MetaGraphDef. Thank you!

I found jax.xla_computation().as_serialized_hlo_module_proto() to solve this problem. So this is a problom when I serialize my .pb file.
Thank you for your reply Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60558">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60558">No</a>

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Have you reproduced the bug with TF nightly?

Yes

### Source

source

### Tensorflow Version

2.8

### Custom Code

Yes

### OS Platform and Distribution

ubuntu 16.04

### Mobile device

_No response_

### Python version

3.8

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current Behaviour?

A bug happened!
I use hlo_pb2.HloModuleProto.ParseFromString to get the hlo model, but 'google.protobuf.message.DecodeError: Error parsing message' will be reported.
In addition, I can use tf.compat.v1.GraphDef() to load the model.
May I ask if there is something wrong with the method I used

### Standalone code to reproduce the issue

```shell
import tensorflow as tf

pb_file_path = os.getcwd()

with tf.compat.v1.Session(graph=tf.Graph()) as sess:
    x = tf.compat.v1.placeholder(tf.float32, name='x')
    y = tf.compat.v1.placeholder(tf.float32, name='y')
    b = tf.Variable(1.0, name='b')
    xy = tf.multiply(x, y)
    op = tf.add(xy, b, name='op_to_store')
    sess.run(tf.compat.v1.global_variables_initalizer())
    constant_graph = tf.compat.v1.graph_util.convert_variables_to_constants(sess, sess.graph_def, ['op_to_store'])
    with tf.io.gfile.GFile('./model/test.pb', 'wb') as f:
        f.write(constant_graph.SerializeToString())

from tensorflow.compiler.xla.service import hlo_pb2
with tf.io.gfile.GFile('./tmp.pb', 'rb') as f:
    module = hlo_pb2.HloModuleProto()
    module.ParseFromString(f.read())
    # module = tf.compat.v1.GraphDef()
    # module.ParseFromString(f.read())
```


### Relevant log output

_No response_</details>