Mark XLAShapeForArgument as const.
authorJacques Pienaar <jpienaar@google.com>
Thu, 31 May 2018 21:24:13 +0000 (14:24 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Thu, 31 May 2018 21:27:02 +0000 (14:27 -0700)
PiperOrigin-RevId: 198778945

tensorflow/compiler/tf2xla/xla_compiler.cc
tensorflow/compiler/tf2xla/xla_compiler.h

index 2fce616..a8bd199 100644 (file)
@@ -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";
index 76f4c4c..c93850c 100644 (file)
@@ -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.