message: [lite] Freeze read only variables post resource decomposition pass.
diff: @@ -92,6 +92,8 @@ void AddTFToTFLConversionPasses(const toco::ModelFlags& model_flags,
  pass_manager->addPass(mlir::TF::CreateTFShapeInferencePass());
  }
  + // TODO(b/149099381): Remove after handling WhileRegion in favor of later
  + // instance.
  if (session.hasValue()) {
  pass_manager->addPass(
  mlir::tf_saved_model::CreateFreezeVariablesPass(session.getValue()));
  @@ -119,6 +121,12 @@ void AddTFToTFLConversionPasses(const toco::ModelFlags& model_flags,
  pass_manager->addNestedPass<mlir::FuncOp>(
  mlir::TFDevice::CreateDecomposeResourceOpsPass());
  + // Try freezing again read only vars post resource decomposition.
  + if (session.hasValue()) {
  + pass_manager->addPass(
  + mlir::tf_saved_model::CreateFreezeVariablesPass(session.getValue()));
  + }
  +
  // Note:
  // We need to fuse composite ops before LowerStaticTensorList pass.
  // The tensorflow list is not supported right now by that pass.
  