From 09f12c0399c13e273db7eb40455be63ef2e03a5e Mon Sep 17 00:00:00 2001 From: Jaesung Chung Date: Tue, 12 Jan 2021 14:51:59 -0800 Subject: [PATCH] Refine an error message when MLIR converter encounters mutable variable cases PiperOrigin-RevId: 351454938 Change-Id: I46c8ef3f6cb8fc0449f01dabbd19d028fc5474a0 --- .../mlir/tensorflow/transforms/freeze_global_tensors.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tensorflow/compiler/mlir/tensorflow/transforms/freeze_global_tensors.cc b/tensorflow/compiler/mlir/tensorflow/transforms/freeze_global_tensors.cc index e13fcc43090..9e0d1d4bf90 100644 --- a/tensorflow/compiler/mlir/tensorflow/transforms/freeze_global_tensors.cc +++ b/tensorflow/compiler/mlir/tensorflow/transforms/freeze_global_tensors.cc @@ -70,9 +70,10 @@ 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, try running " - "tf-saved-model-optimize-global-tensors " - "to prove tensors are immutable"; + global_tensor.emitError() + << "is not immutable, try removing mutable variables in your model " + "since mutable variables are currently not supported through " + "this converter"; return signalPassFailure(); }