[Grappler shape inference] Only construct Tensors for constant node inputs in UpdateNode if we are actually going to run shape refinement. This construction is a big source of CPU usage in Grappler.
[Grappler shape inference] Only construct Tensors for constant node inputs in UpdateNode if we are actually going to run shape refinement. This construction is a big source of CPU usage in Grappler.

PiperOrigin-RevId: 252855718

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