From 50dc3262ea2f605df5774c65343fb4c0e4860951 Mon Sep 17 00:00:00 2001 From: Sean Silva Date: Thu, 21 May 2020 16:56:44 -0700 Subject: [PATCH] Improve diagnostic when a mutable global tensor is found PiperOrigin-RevId: 312767251 Change-Id: I5392241d6b3a3c965b547d7fc44b7665b480d20b --- .../mlir/tensorflow/transforms/freeze_global_tensors.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tensorflow/compiler/mlir/tensorflow/transforms/freeze_global_tensors.cc b/tensorflow/compiler/mlir/tensorflow/transforms/freeze_global_tensors.cc index d3b064f3efa..9d2a7e787ff 100644 --- a/tensorflow/compiler/mlir/tensorflow/transforms/freeze_global_tensors.cc +++ b/tensorflow/compiler/mlir/tensorflow/transforms/freeze_global_tensors.cc @@ -66,7 +66,9 @@ void FreezeGlobalTensorsPass::runOnOperation() { // previous optimize global tensors pass). If not, this pass has to fail // since it cannot perform one of its goals. if (global_tensor.is_mutable()) { - global_tensor.emitError() << "is not immutable"; + global_tensor.emitError() << "is not immutable, try running " + "tf-saved-model-optimize-global-tensors " + "to prove tensors are immutable"; return signalPassFailure(); }