Improve diagnostic when a mutable global tensor is found
PiperOrigin-RevId: 312767251 Change-Id: I5392241d6b3a3c965b547d7fc44b7665b480d20b
This commit is contained in:
		
							parent
							
								
									09243a984d
								
							
						
					
					
						commit
						50dc3262ea
					
				@ -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();
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user