aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jacques Pienaar <jpienaar@google.com>2018-05-31 14:24:13 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-05-31 14:27:02 -0700
commita18cb8741048e888ca854576f4ef352004344e0b (patch)
tree8a474b9e08d1e5c4a12abb2e379c34e439f70af2
parent395428bcaf02c9a9e8067083993d7e6b5afdc0a6 (diff)
Mark XLAShapeForArgument as const.
PiperOrigin-RevId: 198778945
-rw-r--r--tensorflow/compiler/tf2xla/xla_compiler.cc2
-rw-r--r--tensorflow/compiler/tf2xla/xla_compiler.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/compiler/tf2xla/xla_compiler.cc b/tensorflow/compiler/tf2xla/xla_compiler.cc
index 2fce6166d4..a8bd199675 100644
--- a/tensorflow/compiler/tf2xla/xla_compiler.cc
+++ b/tensorflow/compiler/tf2xla/xla_compiler.cc
@@ -225,7 +225,7 @@ Status XlaCompiler::CompileFunction(const XlaCompiler::CompileOptions& options,
// Computes the XLA shape for argument 'arg'.
Status XlaCompiler::XLAShapeForArgument(const XlaCompiler::Argument& arg,
bool is_entry_computation,
- xla::Shape* xla_shape) {
+ xla::Shape* xla_shape) const {
switch (arg.kind) {
case XlaCompiler::Argument::kConstant:
LOG(FATAL) << "Unreachable case";
diff --git a/tensorflow/compiler/tf2xla/xla_compiler.h b/tensorflow/compiler/tf2xla/xla_compiler.h
index 76f4c4c1ea..c93850ce27 100644
--- a/tensorflow/compiler/tf2xla/xla_compiler.h
+++ b/tensorflow/compiler/tf2xla/xla_compiler.h
@@ -314,7 +314,7 @@ class XlaCompiler {
// See the class comment for more details about the argument passing
// convention.
Status XLAShapeForArgument(const Argument& arg, bool is_entry_computation,
- xla::Shape* xla_shape);
+ xla::Shape* xla_shape) const;
// Retrieves the channel handle associated with `key`. Allocates
// a new channel handle if none exists.