Refine an error message when MLIR converter encounters mutable variable cases
PiperOrigin-RevId: 351454938 Change-Id: I46c8ef3f6cb8fc0449f01dabbd19d028fc5474a0
This commit is contained in:
parent
eaf998c965
commit
09f12c0399
@ -70,9 +70,10 @@ void FreezeGlobalTensorsPass::runOnOperation() {
|
|||||||
// previous optimize global tensors pass). If not, this pass has to fail
|
// previous optimize global tensors pass). If not, this pass has to fail
|
||||||
// since it cannot perform one of its goals.
|
// since it cannot perform one of its goals.
|
||||||
if (global_tensor.is_mutable()) {
|
if (global_tensor.is_mutable()) {
|
||||||
global_tensor.emitError() << "is not immutable, try running "
|
global_tensor.emitError()
|
||||||
"tf-saved-model-optimize-global-tensors "
|
<< "is not immutable, try removing mutable variables in your model "
|
||||||
"to prove tensors are immutable";
|
"since mutable variables are currently not supported through "
|
||||||
|
"this converter";
|
||||||
return signalPassFailure();
|
return signalPassFailure();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user