Add GetRankedTensorTypeForOperand that handlesconstant ops with non-static shapes due to constant folding.
Add GetRankedTensorTypeForOperand that handlesconstant ops with non-static
shapes due to constant folding.

Use the new routine to refine a few other routines.

PiperOrigin-RevId: 274224979

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