Improve diagnostic when a mutable global tensor is found

PiperOrigin-RevId: 312767251
Change-Id: I5392241d6b3a3c965b547d7fc44b7665b480d20b
This commit is contained in:
Sean Silva 2020-05-21 16:56:44 -07:00 committed by TensorFlower Gardener
parent 09243a984d
commit 50dc3262ea
1 changed files with 3 additions and 1 deletions

View File

@ -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();
}