In saved_model.save.map_resources(), make distribute variable go through resource variable path with its primary component to avoid an all-reduce in SyncOnReadVariables. This enables using saved_model.save() on a model created with MultiWorkerMirroredStrategy.
In saved_model.save.map_resources(), make distribute variable go through resource variable path with its primary component to avoid an all-reduce in SyncOnReadVariables. This enables using saved_model.save() on a model created with MultiWorkerMirroredStrategy.

PiperOrigin-RevId: 279202279
Change-Id: Ia53cb3bfb194d824420da9b81fc4212460142ed9

Intel-tensorflow/tensorflow,davidzchen/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,renyi533/tensorflow,Intel-tensorflow/tensorflow,adit-chandra/tensorflow,xzturn/tensorflow,tensorflow/tensorflow,renyi533/tensorflow,petewarden/tensorflow,tensorflow/tensorflow,xzturn/tensorflow,freedomtan/tensorflow,jhseu/tensorflow,annarev/tensorflow,davidzchen/tensorflow,paolodedios/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow-pywrap_saved_model,petewarden/tensorflow,xzturn/tensorflow,gunan/tensorflow,aam-at/tensorflow,davidzchen/tensorflow,frreiss/tensorflow-fred,sarvex/tensorflow,petewarden/tensorflow,gunan/tensorflow,gautam1858/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,karllessard/tensorflow,annarev/tensorflow,arborh/tensorflow,karllessard/tensorflow,gautam1858/tensorflow,jhseu/tensorflow,gautam1858/tensorflow,ppwwyyxx/tensorflow,cxxgtxy/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-pywrap_saved_model,freedomtan/tensorflow,Intel-tensorflow/tensorflow,Intel-Corporation/tensorflow,xzturn/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_saved_model,annarev/tensorflow,sarvex/tensorflow,aldian/tensorflow,freedomtan/tensorflow,jhseu/tensorflow,karllessard/tensorflow,karllessard/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_saved_model,cxxgtxy/tensorflow,xzturn/tensorflow,aam-at/tensorflow,davidzchen/tensorflow,aam-at/tensorflow,cxxgtxy/tensorflow,davidzchen/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,karllessard/tensorflow,arborh/tensorflow,cxxgtxy/tensorflow,frreiss/tensorflow-fred,freedomtan/tensorflow,jhseu/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,davidzchen/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,annarev/tensorflow,gautam1858/tensorflow,arborh/tensorflow,Intel-tensorflow/tensorflow,gunan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,ppwwyyxx/tensorflow,aam-at/tensorflow,arborh/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-pywrap_saved_model,renyi533/tensorflow,aam-at/tensorflow,renyi533/tensorflow,gautam1858/tensorflow,renyi533/tensorflow,davidzchen/tensorflow,yongtang/tensorflow,renyi533/tensorflow,freedomtan/tensorflow,sarvex/tensorflow,karllessard/tensorflow,adit-chandra/tensorflow,aam-at/tensorflow,aldian/tensorflow,petewarden/tensorflow,Intel-Corporation/tensorflow,xzturn/tensorflow,adit-chandra/tensorflow,sarvex/tensorflow,gautam1858/tensorflow,davidzchen/tensorflow,karllessard/tensorflow,jhseu/tensorflow,freedomtan/tensorflow,renyi533/tensorflow,aldian/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,aldian/tensorflow,gautam1858/tensorflow,jhseu/tensorflow,jhseu/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,sarvex/tensorflow,ppwwyyxx/tensorflow,yongtang/tensorflow,cxxgtxy/tensorflow,adit-chandra/tensorflow,aam-at/tensorflow,petewarden/tensorflow,aam-at/tensorflow,petewarden/tensorflow,renyi533/tensorflow,petewarden/tensorflow,gunan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,sarvex/tensorflow,tensorflow/tensorflow-pywrap_saved_model,ppwwyyxx/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,jhseu/tensorflow,arborh/tensorflow,aldian/tensorflow,arborh/tensorflow,frreiss/tensorflow-fred,Intel-Corporation/tensorflow,aam-at/tensorflow,karllessard/tensorflow,renyi533/tensorflow,paolodedios/tensorflow,arborh/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,jhseu/tensorflow,tensorflow/tensorflow,paolodedios/tensorflow,Intel-Corporation/tensorflow,aldian/tensorflow,freedomtan/tensorflow,yongtang/tensorflow,arborh/tensorflow,paolodedios/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow,annarev/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow,gunan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,yongtang/tensorflow,gautam1858/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gunan/tensorflow,xzturn/tensorflow,sarvex/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-pywrap_saved_model,arborh/tensorflow,freedomtan/tensorflow,xzturn/tensorflow,adit-chandra/tensorflow,adit-chandra/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow,ppwwyyxx/tensorflow,yongtang/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,paolodedios/tensorflow,xzturn/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,adit-chandra/tensorflow,ppwwyyxx/tensorflow,paolodedios/tensorflow,freedomtan/tensorflow,gunan/tensorflow,arborh/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,frreiss/tensorflow-fred,frreiss/tensorflow-fred,frreiss/tensorflow-fred,gautam1858/tensorflow,davidzchen/tensorflow,adit-chandra/tensorflow,karllessard/tensorflow,frreiss/tensorflow-fred,frreiss/tensorflow-fred,arborh/tensorflow,renyi533/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,cxxgtxy/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,renyi533/tensorflow,aldian/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,ppwwyyxx/tensorflow,davidzchen/tensorflow,yongtang/tensorflow,jhseu/tensorflow,gunan/tensorflow,tensorflow/tensorflow,sarvex/tensorflow,aam-at/tensorflow,karllessard/tensorflow,gunan/tensorflow,xzturn/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,renyi533/tensorflow,gautam1858/tensorflow,adit-chandra/tensorflow,petewarden/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,aldian/tensorflow,annarev/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,aam-at/tensorflow,xzturn/tensorflow,tensorflow/tensorflow,frreiss/tensorflow-fred,gautam1858/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,ppwwyyxx/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-experimental_link_static_libraries_once,cxxgtxy/tensorflow,yongtang/tensorflow,frreiss/tensorflow-fred,Intel-Corporation/tensorflow,annarev/tensorflow,ppwwyyxx/tensorflow,gunan/tensorflow,davidzchen/tensorflow,jhseu/tensorflow,freedomtan/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-pywrap_saved_model,xzturn/tensorflow,annarev/tensorflow,gunan/tensorflow,adit-chandra/tensorflow,gunan/tensorflow,paolodedios/tensorflow,Intel-tensorflow/tensorflow,arborh/tensorflow,Intel-Corporation/tensorflow,yongtang/tensorflow,annarev/tensorflow,ppwwyyxx/tensorflow,annarev/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer