aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/hlo_proto_util.h
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-05-25 18:19:02 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-05-25 18:22:34 -0700
commit3e767e9db0e0a00a509354ec18462841ea4d40f2 (patch)
treeb4eaf4f8aadab0a4ffec95e4ce67fe3548353b65 /tensorflow/compiler/xla/service/hlo_proto_util.h
parentca0d25c2d7f7dea6f35e3dea20c8a755fd58c637 (diff)
Add debug protos that serialize HLO graph information.
Also add flags to dump this data in JSON format, for each backend. This is useful for upcoming debugging tools. PiperOrigin-RevId: 157178357
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_proto_util.h')
-rw-r--r--tensorflow/compiler/xla/service/hlo_proto_util.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_proto_util.h b/tensorflow/compiler/xla/service/hlo_proto_util.h
new file mode 100644
index 0000000000..603259a11f
--- /dev/null
+++ b/tensorflow/compiler/xla/service/hlo_proto_util.h
@@ -0,0 +1,36 @@
+/* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+==============================================================================*/
+
+// Utilities to manipulate data in hlo.proto.
+
+#ifndef TENSORFLOW_COMPILER_XLA_SERVICE_HLO_PROTO_UTIL_H_
+#define TENSORFLOW_COMPILER_XLA_SERVICE_HLO_PROTO_UTIL_H_
+
+#include <string>
+
+#include "tensorflow/compiler/xla/service/buffer_assignment.h"
+#include "tensorflow/compiler/xla/service/hlo.pb.h"
+#include "tensorflow/compiler/xla/service/hlo_module.h"
+#include "tensorflow/compiler/xla/status.h"
+
+namespace xla {
+
+// Returns a serialized representation of the HLO state.
+HloProto MakeHloProto(const HloModule& module,
+ const BufferAssignment& assignment);
+
+} // namespace xla
+
+#endif // TENSORFLOW_COMPILER_XLA_SERVICE_HLO_PROTO_UTIL_H_