[XLA] Avoid recursion in global decreasing size best-fit heap.
[XLA] Avoid recursion in global decreasing size best-fit heap.

PiperOrigin-RevId: 214489542

hehongliang/tensorflow,girving/tensorflow,aam-at/tensorflow,Bismarrck/tensorflow,dongjoon-hyun/tensorflow,tensorflow/tensorflow,theflofly/tensorflow,hehongliang/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow-pywrap_saved_model,seanli9jan/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,alshedivat/tensorflow,alshedivat/tensorflow,chemelnucfin/tensorflow,dongjoon-hyun/tensorflow,hehongliang/tensorflow,ghchinoy/tensorflow,annarev/tensorflow,petewarden/tensorflow,Intel-Corporation/tensorflow,petewarden/tensorflow,snnn/tensorflow,asimshankar/tensorflow,cxxgtxy/tensorflow,alshedivat/tensorflow,kobejean/tensorflow,alsrgv/tensorflow,tensorflow/tensorflow-pywrap_saved_model,renyi533/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,frreiss/tensorflow-fred,ghchinoy/tensorflow,ageron/tensorflow,Bismarrck/tensorflow,paolodedios/tensorflow,chemelnucfin/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,asimshankar/tensorflow,seanli9jan/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,davidzchen/tensorflow,petewarden/tensorflow,karllessard/tensorflow,kevin-coder/tensorflow-fork,apark263/tensorflow,xzturn/tensorflow,jendap/tensorflow,cxxgtxy/tensorflow,arborh/tensorflow,theflofly/tensorflow,snnn/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,annarev/tensorflow,jhseu/tensorflow,jhseu/tensorflow,aam-at/tensorflow,girving/tensorflow,alsrgv/tensorflow,yongtang/tensorflow,theflofly/tensorflow,ghchinoy/tensorflow,jbedorf/tensorflow,jbedorf/tensorflow,paolodedios/tensorflow,arborh/tensorflow,jendap/tensorflow,renyi533/tensorflow,freedomtan/tensorflow,annarev/tensorflow,Intel-tensorflow/tensorflow,Intel-Corporation/tensorflow,paolodedios/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow,ppwwyyxx/tensorflow,cxxgtxy/tensorflow,ppwwyyxx/tensorflow,sarvex/tensorflow,frreiss/tensorflow-fred,jbedorf/tensorflow,paolodedios/tensorflow,jbedorf/tensorflow,renyi533/tensorflow,chemelnucfin/tensorflow,ghchinoy/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,karllessard/tensorflow,DavidNorman/tensorflow,gunan/tensorflow,chemelnucfin/tensorflow,alshedivat/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,chemelnucfin/tensorflow,ageron/tensorflow,renyi533/tensorflow,gunan/tensorflow,ageron/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow,jhseu/tensorflow,chemelnucfin/tensorflow,cxxgtxy/tensorflow,ppwwyyxx/tensorflow,hfp/tensorflow-xsmm,davidzchen/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,theflofly/tensorflow,aam-at/tensorflow,frreiss/tensorflow-fred,freedomtan/tensorflow,girving/tensorflow,snnn/tensorflow,sarvex/tensorflow,kobejean/tensorflow,chemelnucfin/tensorflow,ppwwyyxx/tensorflow,snnn/tensorflow,adit-chandra/tensorflow,ageron/tensorflow,gunan/tensorflow,ageron/tensorflow,gautam1858/tensorflow,xzturn/tensorflow,asimshankar/tensorflow,seanli9jan/tensorflow,tensorflow/tensorflow,chemelnucfin/tensorflow,jendap/tensorflow,girving/tensorflow,theflofly/tensorflow,xzturn/tensorflow,hfp/tensorflow-xsmm,tensorflow/tensorflow,seanli9jan/tensorflow,brchiu/tensorflow,brchiu/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,DavidNorman/tensorflow,jendap/tensorflow,brchiu/tensorflow,yongtang/tensorflow,annarev/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,arborh/tensorflow,kevin-coder/tensorflow-fork,asimshankar/tensorflow,dancingdan/tensorflow,renyi533/tensorflow,adit-chandra/tensorflow,kevin-coder/tensorflow-fork,karllessard/tensorflow,apark263/tensorflow,annarev/tensorflow,theflofly/tensorflow,freedomtan/tensorflow,xzturn/tensorflow,adit-chandra/tensorflow,apark263/tensorflow,Intel-tensorflow/tensorflow,frreiss/tensorflow-fred,brchiu/tensorflow,ghchinoy/tensorflow,yongtang/tensorflow,aam-at/tensorflow,jendap/tensorflow,alshedivat/tensorflow,alsrgv/tensorflow,jhseu/tensorflow,xzturn/tensorflow,brchiu/tensorflow,renyi533/tensorflow,jendap/tensorflow,Intel-tensorflow/tensorflow,arborh/tensorflow,seanli9jan/tensorflow,frreiss/tensorflow-fred,annarev/tensorflow,alsrgv/tensorflow,alsrgv/tensorflow,xzturn/tensorflow,paolodedios/tensorflow,alsrgv/tensorflow,gunan/tensorflow,freedomtan/tensorflow,renyi533/tensorflow,aldian/tensorflow,hfp/tensorflow-xsmm,kobejean/tensorflow,kobejean/tensorflow,gautam1858/tensorflow,dongjoon-hyun/tensorflow,jhseu/tensorflow,jhseu/tensorflow,hfp/tensorflow-xsmm,tensorflow/tensorflow,kevin-coder/tensorflow-fork,ageron/tensorflow,ghchinoy/tensorflow,xzturn/tensorflow,jendap/tensorflow,dongjoon-hyun/tensorflow,theflofly/tensorflow,jendap/tensorflow,hehongliang/tensorflow,kobejean/tensorflow,theflofly/tensorflow,ageron/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gunan/tensorflow,adit-chandra/tensorflow,jbedorf/tensorflow,Intel-tensorflow/tensorflow,apark263/tensorflow,kevin-coder/tensorflow-fork,snnn/tensorflow,tensorflow/tensorflow-pywrap_saved_model,jbedorf/tensorflow,arborh/tensorflow,freedomtan/tensorflow,aam-at/tensorflow,Intel-tensorflow/tensorflow,ghchinoy/tensorflow,jbedorf/tensorflow,asimshankar/tensorflow,snnn/tensorflow,theflofly/tensorflow,renyi533/tensorflow,gunan/tensorflow,asimshankar/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aam-at/tensorflow,kobejean/tensorflow,Intel-tensorflow/tensorflow,aldian/tensorflow,snnn/tensorflow,alsrgv/tensorflow,Bismarrck/tensorflow,tensorflow/tensorflow-pywrap_saved_model,kobejean/tensorflow,apark263/tensorflow,hfp/tensorflow-xsmm,jendap/tensorflow,jbedorf/tensorflow,kevin-coder/tensorflow-fork,davidzchen/tensorflow,girving/tensorflow,dancingdan/tensorflow,hehongliang/tensorflow,gunan/tensorflow,Intel-tensorflow/tensorflow,Intel-Corporation/tensorflow,brchiu/tensorflow,xzturn/tensorflow,gunan/tensorflow,chemelnucfin/tensorflow,renyi533/tensorflow,girving/tensorflow,karllessard/tensorflow,Bismarrck/tensorflow,DavidNorman/tensorflow,freedomtan/tensorflow,aldian/tensorflow,yongtang/tensorflow,Intel-Corporation/tensorflow,petewarden/tensorflow,seanli9jan/tensorflow,apark263/tensorflow,Bismarrck/tensorflow,paolodedios/tensorflow,karllessard/tensorflow,karllessard/tensorflow,dongjoon-hyun/tensorflow,ghchinoy/tensorflow,annarev/tensorflow,hfp/tensorflow-xsmm,jhseu/tensorflow,cxxgtxy/tensorflow,Intel-Corporation/tensorflow,davidzchen/tensorflow,chemelnucfin/tensorflow,freedomtan/tensorflow,seanli9jan/tensorflow,Intel-tensorflow/tensorflow,brchiu/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,dongjoon-hyun/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,alsrgv/tensorflow,DavidNorman/tensorflow,karllessard/tensorflow,asimshankar/tensorflow,gunan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,apark263/tensorflow,karllessard/tensorflow,apark263/tensorflow,dongjoon-hyun/tensorflow,dongjoon-hyun/tensorflow,dancingdan/tensorflow,dancingdan/tensorflow,ageron/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,DavidNorman/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,brchiu/tensorflow,davidzchen/tensorflow,aam-at/tensorflow,alshedivat/tensorflow,kobejean/tensorflow,brchiu/tensorflow,alsrgv/tensorflow,cxxgtxy/tensorflow,dongjoon-hyun/tensorflow,Bismarrck/tensorflow,Intel-Corporation/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,asimshankar/tensorflow,ppwwyyxx/tensorflow,frreiss/tensorflow-fred,frreiss/tensorflow-fred,seanli9jan/tensorflow,Bismarrck/tensorflow,dancingdan/tensorflow,gautam1858/tensorflow,theflofly/tensorflow,arborh/tensorflow,seanli9jan/tensorflow,seanli9jan/tensorflow,girving/tensorflow,ghchinoy/tensorflow,apark263/tensorflow,adit-chandra/tensorflow,aldian/tensorflow,yongtang/tensorflow,seanli9jan/tensorflow,ghchinoy/tensorflow,jhseu/tensorflow,kevin-coder/tensorflow-fork,kevin-coder/tensorflow-fork,gautam1858/tensorflow,alsrgv/tensorflow,kobejean/tensorflow,snnn/tensorflow,jhseu/tensorflow,kevin-coder/tensorflow-fork,gunan/tensorflow,hfp/tensorflow-xsmm,Intel-Corporation/tensorflow,DavidNorman/tensorflow,dancingdan/tensorflow,girving/tensorflow,freedomtan/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-pywrap_saved_model,adit-chandra/tensorflow,renyi533/tensorflow,tensorflow/tensorflow-pywrap_saved_model,snnn/tensorflow,DavidNorman/tensorflow,adit-chandra/tensorflow,gunan/tensorflow,hehongliang/tensorflow,jbedorf/tensorflow,girving/tensorflow,alshedivat/tensorflow,arborh/tensorflow,dancingdan/tensorflow,alshedivat/tensorflow,sarvex/tensorflow,annarev/tensorflow,hfp/tensorflow-xsmm,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,hehongliang/tensorflow,kobejean/tensorflow,alshedivat/tensorflow,gautam1858/tensorflow,petewarden/tensorflow,jendap/tensorflow,aam-at/tensorflow,yongtang/tensorflow,ghchinoy/tensorflow,alshedivat/tensorflow,jbedorf/tensorflow,snnn/tensorflow,DavidNorman/tensorflow,sarvex/tensorflow,yongtang/tensorflow,arborh/tensorflow,Bismarrck/tensorflow,tensorflow/tensorflow-pywrap_saved_model,DavidNorman/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,davidzchen/tensorflow,asimshankar/tensorflow,tensorflow/tensorflow,ppwwyyxx/tensorflow,xzturn/tensorflow,adit-chandra/tensorflow,yongtang/tensorflow,snnn/tensorflow,gunan/tensorflow,aam-at/tensorflow,ghchinoy/tensorflow,renyi533/tensorflow,yongtang/tensorflow,davidzchen/tensorflow,paolodedios/tensorflow,kevin-coder/tensorflow-fork,theflofly/tensorflow,tensorflow/tensorflow,aldian/tensorflow,gautam1858/tensorflow,ppwwyyxx/tensorflow,freedomtan/tensorflow,dancingdan/tensorflow,petewarden/tensorflow,jbedorf/tensorflow,sarvex/tensorflow,dongjoon-hyun/tensorflow,dancingdan/tensorflow,apark263/tensorflow,aam-at/tensorflow,frreiss/tensorflow-fred,aldian/tensorflow,apark263/tensorflow,yongtang/tensorflow,alsrgv/tensorflow,dancingdan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,sarvex/tensorflow,jbedorf/tensorflow,gautam1858/tensorflow,gautam1858/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow,xzturn/tensorflow,Intel-Corporation/tensorflow,petewarden/tensorflow,karllessard/tensorflow,petewarden/tensorflow,arborh/tensorflow,ppwwyyxx/tensorflow,adit-chandra/tensorflow,girving/tensorflow,jendap/tensorflow,cxxgtxy/tensorflow,chemelnucfin/tensorflow,brchiu/tensorflow,petewarden/tensorflow,sarvex/tensorflow,jhseu/tensorflow,adit-chandra/tensorflow,annarev/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,dongjoon-hyun/tensorflow,ageron/tensorflow,annarev/tensorflow,aldian/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,xzturn/tensorflow,arborh/tensorflow,kevin-coder/tensorflow-fork,davidzchen/tensorflow,petewarden/tensorflow,Bismarrck/tensorflow,gautam1858/tensorflow,paolodedios/tensorflow,hfp/tensorflow-xsmm,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,girving/tensorflow,frreiss/tensorflow-fred,ageron/tensorflow,ppwwyyxx/tensorflow,DavidNorman/tensorflow,brchiu/tensorflow,paolodedios/tensorflow,alsrgv/tensorflow,arborh/tensorflow,davidzchen/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,annarev/tensorflow,dancingdan/tensorflow,Bismarrck/tensorflow,Bismarrck/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,ageron/tensorflow,sarvex/tensorflow,aam-at/tensorflow,aam-at/tensorflow,ppwwyyxx/tensorflow,frreiss/tensorflow-fred,asimshankar/tensorflow,gautam1858/tensorflow,chemelnucfin/tensorflow,freedomtan/tensorflow,alshedivat/tensorflow,theflofly/tensorflow,jhseu/tensorflow,karllessard/tensorflow,davidzchen/tensorflow,gautam1858/tensorflow,petewarden/tensorflow,hfp/tensorflow-xsmm,aldian/tensorflow,ageron/tensorflow,kobejean/tensorflow,hfp/tensorflow-xsmm,renyi533/tensorflow,xzturn/tensorflow,DavidNorman/tensorflow,freedomtan/tensorflow,asimshankar/tensorflow,davidzchen/tensorflow,arborh/tensorflow