Fix BaseGPUDevice, let it report the actual memory limit of the allocator. Also added a helper method to reset ProcessState.
Fix BaseGPUDevice, let it report the actual memory limit of the allocator. Also added a helper method to reset ProcessState.

PiperOrigin-RevId: 186655996

ghchinoy/tensorflow,jendap/tensorflow,dendisuhubdy/tensorflow,dendisuhubdy/tensorflow,ghchinoy/tensorflow,jbedorf/tensorflow,ghchinoy/tensorflow,annarev/tensorflow,renyi533/tensorflow,Xeralux/tensorflow,lukeiwanski/tensorflow,meteorcloudy/tensorflow,alshedivat/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow,davidzchen/tensorflow,petewarden/tensorflow,renyi533/tensorflow,petewarden/tensorflow,allenlavoie/tensorflow,Intel-Corporation/tensorflow,alshedivat/tensorflow,Xeralux/tensorflow,ageron/tensorflow,apark263/tensorflow,snnn/tensorflow,jalexvig/tensorflow,theflofly/tensorflow,AnishShah/tensorflow,alsrgv/tensorflow,ageron/tensorflow,gautam1858/tensorflow,dongjoon-hyun/tensorflow,AnishShah/tensorflow,theflofly/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,alshedivat/tensorflow,apark263/tensorflow,tensorflow/tensorflow-pywrap_saved_model,manipopopo/tensorflow,ppwwyyxx/tensorflow,benoitsteiner/tensorflow-xsmm,xodus7/tensorflow,dendisuhubdy/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,ZhangXinNan/tensorflow,renyi533/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,arborh/tensorflow,jart/tensorflow,nburn42/tensorflow,jalexvig/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,ppwwyyxx/tensorflow,theflofly/tensorflow,ageron/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_saved_model,gunan/tensorflow,davidzchen/tensorflow,alsrgv/tensorflow,xodus7/tensorflow,benoitsteiner/tensorflow-xsmm,brchiu/tensorflow,drpngx/tensorflow,frreiss/tensorflow-fred,aldian/tensorflow,hfp/tensorflow-xsmm,freedomtan/tensorflow,paolodedios/tensorflow,petewarden/tensorflow,drpngx/tensorflow,annarev/tensorflow,renyi533/tensorflow,aam-at/tensorflow,snnn/tensorflow,lukeiwanski/tensorflow,arborh/tensorflow,jhseu/tensorflow,jbedorf/tensorflow,jart/tensorflow,xodus7/tensorflow,Intel-tensorflow/tensorflow,jhseu/tensorflow,kobejean/tensorflow,dongjoon-hyun/tensorflow,nburn42/tensorflow,karllessard/tensorflow,allenlavoie/tensorflow,tensorflow/tensorflow,allenlavoie/tensorflow,tensorflow/tensorflow-pywrap_saved_model,allenlavoie/tensorflow,Bismarrck/tensorflow,yanchen036/tensorflow,hehongliang/tensorflow,aselle/tensorflow,xodus7/tensorflow,manipopopo/tensorflow,kobejean/tensorflow,gautam1858/tensorflow,ageron/tensorflow,DavidNorman/tensorflow,arborh/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,aam-at/tensorflow,alshedivat/tensorflow,DavidNorman/tensorflow,Intel-Corporation/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_saved_model,ZhangXinNan/tensorflow,alsrgv/tensorflow,hfp/tensorflow-xsmm,nburn42/tensorflow,manipopopo/tensorflow,theflofly/tensorflow,eaplatanios/tensorflow,kobejean/tensorflow,gautam1858/tensorflow,kevin-coder/tensorflow-fork,xzturn/tensorflow,dendisuhubdy/tensorflow,jalexvig/tensorflow,ageron/tensorflow,xodus7/tensorflow,aselle/tensorflow,kevin-coder/tensorflow-fork,Xeralux/tensorflow,alsrgv/tensorflow,gautam1858/tensorflow,xodus7/tensorflow,lukeiwanski/tensorflow,Bismarrck/tensorflow,drpngx/tensorflow,freedomtan/tensorflow,alsrgv/tensorflow,ppwwyyxx/tensorflow,jendap/tensorflow,jbedorf/tensorflow,benoitsteiner/tensorflow-xsmm,theflofly/tensorflow,jart/tensorflow,aselle/tensorflow,jbedorf/tensorflow,asimshankar/tensorflow,ageron/tensorflow,Bismarrck/tensorflow,girving/tensorflow,caisq/tensorflow,frreiss/tensorflow-fred,Intel-tensorflow/tensorflow,Intel-tensorflow/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow,frreiss/tensorflow-fred,sarvex/tensorflow,kobejean/tensorflow,davidzchen/tensorflow,hehongliang/tensorflow,Intel-tensorflow/tensorflow,kobejean/tensorflow,cxxgtxy/tensorflow,renyi533/tensorflow,Xeralux/tensorflow,aldian/tensorflow,girving/tensorflow,gunan/tensorflow,freedomtan/tensorflow,aselle/tensorflow,asimshankar/tensorflow,cxxgtxy/tensorflow,kevin-coder/tensorflow-fork,nburn42/tensorflow,jendap/tensorflow,alsrgv/tensorflow,meteorcloudy/tensorflow,dongjoon-hyun/tensorflow,benoitsteiner/tensorflow-xsmm,jhseu/tensorflow,chemelnucfin/tensorflow,yongtang/tensorflow,gunan/tensorflow,jalexvig/tensorflow,jart/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,alshedivat/tensorflow,arborh/tensorflow,gunan/tensorflow,kobejean/tensorflow,Intel-tensorflow/tensorflow,dendisuhubdy/tensorflow,hehongliang/tensorflow,manipopopo/tensorflow,Intel-tensorflow/tensorflow,snnn/tensorflow,frreiss/tensorflow-fred,petewarden/tensorflow,Intel-tensorflow/tensorflow,hfp/tensorflow-xsmm,tensorflow/tensorflow-experimental_link_static_libraries_once,manipopopo/tensorflow,xodus7/tensorflow,asimshankar/tensorflow,aldian/tensorflow,ppwwyyxx/tensorflow,AnishShah/tensorflow,aldian/tensorflow,eaplatanios/tensorflow,girving/tensorflow,jbedorf/tensorflow,dancingdan/tensorflow,snnn/tensorflow,benoitsteiner/tensorflow-xsmm,jart/tensorflow,meteorcloudy/tensorflow,aselle/tensorflow,sarvex/tensorflow,snnn/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,chemelnucfin/tensorflow,manipopopo/tensorflow,brchiu/tensorflow,dongjoon-hyun/tensorflow,annarev/tensorflow,cxxgtxy/tensorflow,sarvex/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aam-at/tensorflow,dongjoon-hyun/tensorflow,tensorflow/tensorflow-pywrap_saved_model,jendap/tensorflow,paolodedios/tensorflow,gojira/tensorflow,paolodedios/tensorflow,ageron/tensorflow,Intel-Corporation/tensorflow,aam-at/tensorflow,seanli9jan/tensorflow,xzturn/tensorflow,jbedorf/tensorflow,gunan/tensorflow,brchiu/tensorflow,jalexvig/tensorflow,dancingdan/tensorflow,gojira/tensorflow,yongtang/tensorflow,meteorcloudy/tensorflow,aldian/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,lukeiwanski/tensorflow,caisq/tensorflow,seanli9jan/tensorflow,DavidNorman/tensorflow,seanli9jan/tensorflow,Bismarrck/tensorflow,gunan/tensorflow,adit-chandra/tensorflow,chemelnucfin/tensorflow,annarev/tensorflow,arborh/tensorflow,dongjoon-hyun/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,jendap/tensorflow,Xeralux/tensorflow,jbedorf/tensorflow,adit-chandra/tensorflow,sarvex/tensorflow,Bismarrck/tensorflow,girving/tensorflow,allenlavoie/tensorflow,hfp/tensorflow-xsmm,brchiu/tensorflow,freedomtan/tensorflow,ghchinoy/tensorflow,frreiss/tensorflow-fred,DavidNorman/tensorflow,Bismarrck/tensorflow,ppwwyyxx/tensorflow,yongtang/tensorflow,annarev/tensorflow,gojira/tensorflow,caisq/tensorflow,freedomtan/tensorflow,caisq/tensorflow,gunan/tensorflow,jhseu/tensorflow,lukeiwanski/tensorflow,chemelnucfin/tensorflow,meteorcloudy/tensorflow,ppwwyyxx/tensorflow,alshedivat/tensorflow,adit-chandra/tensorflow,dongjoon-hyun/tensorflow,girving/tensorflow,seanli9jan/tensorflow,ZhangXinNan/tensorflow,gunan/tensorflow,AnishShah/tensorflow,ppwwyyxx/tensorflow,jart/tensorflow,karllessard/tensorflow,theflofly/tensorflow,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,yongtang/tensorflow,Intel-Corporation/tensorflow,alsrgv/tensorflow,seanli9jan/tensorflow,lukeiwanski/tensorflow,apark263/tensorflow,yanchen036/tensorflow,paolodedios/tensorflow,cxxgtxy/tensorflow,jendap/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,benoitsteiner/tensorflow-xsmm,girving/tensorflow,kevin-coder/tensorflow-fork,arborh/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gojira/tensorflow,manipopopo/tensorflow,hfp/tensorflow-xsmm,chemelnucfin/tensorflow,sarvex/tensorflow,jendap/tensorflow,seanli9jan/tensorflow,tensorflow/tensorflow,freedomtan/tensorflow,manipopopo/tensorflow,jhseu/tensorflow,snnn/tensorflow,karllessard/tensorflow,allenlavoie/tensorflow,allenlavoie/tensorflow,jhseu/tensorflow,aselle/tensorflow,allenlavoie/tensorflow,jart/tensorflow,petewarden/tensorflow,DavidNorman/tensorflow,girving/tensorflow,apark263/tensorflow,jart/tensorflow,paolodedios/tensorflow,yanchen036/tensorflow,theflofly/tensorflow,theflofly/tensorflow,arborh/tensorflow,karllessard/tensorflow,adit-chandra/tensorflow,gunan/tensorflow,ghchinoy/tensorflow,arborh/tensorflow,chemelnucfin/tensorflow,xzturn/tensorflow,drpngx/tensorflow,gautam1858/tensorflow,caisq/tensorflow,chemelnucfin/tensorflow,yanchen036/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,dancingdan/tensorflow,arborh/tensorflow,eaplatanios/tensorflow,renyi533/tensorflow,theflofly/tensorflow,hfp/tensorflow-xsmm,ZhangXinNan/tensorflow,ghchinoy/tensorflow,apark263/tensorflow,eaplatanios/tensorflow,seanli9jan/tensorflow,freedomtan/tensorflow,ghchinoy/tensorflow,kobejean/tensorflow,dendisuhubdy/tensorflow,kevin-coder/tensorflow-fork,gautam1858/tensorflow,gautam1858/tensorflow,frreiss/tensorflow-fred,alsrgv/tensorflow,tensorflow/tensorflow,hfp/tensorflow-xsmm,aselle/tensorflow,petewarden/tensorflow,gunan/tensorflow,jbedorf/tensorflow,jbedorf/tensorflow,apark263/tensorflow,xodus7/tensorflow,renyi533/tensorflow,ghchinoy/tensorflow,dancingdan/tensorflow,eaplatanios/tensorflow,petewarden/tensorflow,dongjoon-hyun/tensorflow,Xeralux/tensorflow,dendisuhubdy/tensorflow,chemelnucfin/tensorflow,Intel-Corporation/tensorflow,DavidNorman/tensorflow,DavidNorman/tensorflow,petewarden/tensorflow,manipopopo/tensorflow,tensorflow/tensorflow,apark263/tensorflow,renyi533/tensorflow,karllessard/tensorflow,meteorcloudy/tensorflow,ghchinoy/tensorflow,gojira/tensorflow,asimshankar/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,dongjoon-hyun/tensorflow,tensorflow/tensorflow-pywrap_saved_model,ZhangXinNan/tensorflow,ppwwyyxx/tensorflow,jalexvig/tensorflow,aam-at/tensorflow,hfp/tensorflow-xsmm,sarvex/tensorflow,paolodedios/tensorflow,hehongliang/tensorflow,eaplatanios/tensorflow,yongtang/tensorflow,AnishShah/tensorflow,drpngx/tensorflow,yongtang/tensorflow,jalexvig/tensorflow,aldian/tensorflow,davidzchen/tensorflow,karllessard/tensorflow,yanchen036/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,dancingdan/tensorflow,nburn42/tensorflow,jhseu/tensorflow,paolodedios/tensorflow,ghchinoy/tensorflow,DavidNorman/tensorflow,xzturn/tensorflow,xzturn/tensorflow,Bismarrck/tensorflow,alshedivat/tensorflow,benoitsteiner/tensorflow-xsmm,lukeiwanski/tensorflow,renyi533/tensorflow,ageron/tensorflow,kobejean/tensorflow,aam-at/tensorflow,theflofly/tensorflow,paolodedios/tensorflow,gautam1858/tensorflow,xzturn/tensorflow,dendisuhubdy/tensorflow,theflofly/tensorflow,snnn/tensorflow,ghchinoy/tensorflow,frreiss/tensorflow-fred,benoitsteiner/tensorflow-xsmm,kevin-coder/tensorflow-fork,drpngx/tensorflow,ageron/tensorflow,Xeralux/tensorflow,snnn/tensorflow,asimshankar/tensorflow,kevin-coder/tensorflow-fork,yongtang/tensorflow,aldian/tensorflow,annarev/tensorflow,eaplatanios/tensorflow,hfp/tensorflow-xsmm,girving/tensorflow,apark263/tensorflow,frreiss/tensorflow-fred,allenlavoie/tensorflow,xzturn/tensorflow,tensorflow/tensorflow,nburn42/tensorflow,jendap/tensorflow,cxxgtxy/tensorflow,aselle/tensorflow,dancingdan/tensorflow,ageron/tensorflow,AnishShah/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,davidzchen/tensorflow,renyi533/tensorflow,davidzchen/tensorflow,alsrgv/tensorflow,Bismarrck/tensorflow,drpngx/tensorflow,jhseu/tensorflow,dancingdan/tensorflow,theflofly/tensorflow,davidzchen/tensorflow,gojira/tensorflow,petewarden/tensorflow,freedomtan/tensorflow,arborh/tensorflow,annarev/tensorflow,dancingdan/tensorflow,seanli9jan/tensorflow,adit-chandra/tensorflow,benoitsteiner/tensorflow-xsmm,manipopopo/tensorflow,girving/tensorflow,jendap/tensorflow,nburn42/tensorflow,nburn42/tensorflow,karllessard/tensorflow,ZhangXinNan/tensorflow,drpngx/tensorflow,eaplatanios/tensorflow,ppwwyyxx/tensorflow,adit-chandra/tensorflow,jbedorf/tensorflow,kevin-coder/tensorflow-fork,Xeralux/tensorflow,karllessard/tensorflow,aldian/tensorflow,asimshankar/tensorflow,asimshankar/tensorflow,apark263/tensorflow,jhseu/tensorflow,ZhangXinNan/tensorflow,dongjoon-hyun/tensorflow,manipopopo/tensorflow,jhseu/tensorflow,girving/tensorflow,tensorflow/tensorflow,hehongliang/tensorflow,lukeiwanski/tensorflow,xodus7/tensorflow,yanchen036/tensorflow,gautam1858/tensorflow,chemelnucfin/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_saved_model,gautam1858/tensorflow,ppwwyyxx/tensorflow,snnn/tensorflow,girving/tensorflow,dancingdan/tensorflow,brchiu/tensorflow,ageron/tensorflow,Xeralux/tensorflow,drpngx/tensorflow,seanli9jan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,aam-at/tensorflow,petewarden/tensorflow,davidzchen/tensorflow,sarvex/tensorflow,dongjoon-hyun/tensorflow,eaplatanios/tensorflow,Bismarrck/tensorflow,karllessard/tensorflow,nburn42/tensorflow,snnn/tensorflow,xodus7/tensorflow,jhseu/tensorflow,ZhangXinNan/tensorflow,Intel-Corporation/tensorflow,petewarden/tensorflow,seanli9jan/tensorflow,petewarden/tensorflow,xzturn/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_saved_model,ZhangXinNan/tensorflow,adit-chandra/tensorflow,yongtang/tensorflow,alshedivat/tensorflow,cxxgtxy/tensorflow,Intel-tensorflow/tensorflow,meteorcloudy/tensorflow,Intel-tensorflow/tensorflow,aselle/tensorflow,DavidNorman/tensorflow,chemelnucfin/tensorflow,tensorflow/tensorflow,dancingdan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,hehongliang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,arborh/tensorflow,gunan/tensorflow,DavidNorman/tensorflow,caisq/tensorflow,gojira/tensorflow,jart/tensorflow,asimshankar/tensorflow,aam-at/tensorflow,kobejean/tensorflow,sarvex/tensorflow,benoitsteiner/tensorflow-xsmm,gojira/tensorflow,gautam1858/tensorflow,adit-chandra/tensorflow,dendisuhubdy/tensorflow,jendap/tensorflow,kevin-coder/tensorflow-fork,xzturn/tensorflow,AnishShah/tensorflow,paolodedios/tensorflow,annarev/tensorflow,caisq/tensorflow,adit-chandra/tensorflow,aam-at/tensorflow,benoitsteiner/tensorflow-xsmm,allenlavoie/tensorflow,xzturn/tensorflow,meteorcloudy/tensorflow,gojira/tensorflow,hfp/tensorflow-xsmm,jalexvig/tensorflow,meteorcloudy/tensorflow,Intel-tensorflow/tensorflow,arborh/tensorflow,brchiu/tensorflow,Bismarrck/tensorflow,frreiss/tensorflow-fred,kobejean/tensorflow,AnishShah/tensorflow,annarev/tensorflow,nburn42/tensorflow,seanli9jan/tensorflow,freedomtan/tensorflow,brchiu/tensorflow,caisq/tensorflow,DavidNorman/tensorflow,gojira/tensorflow,Xeralux/tensorflow,gunan/tensorflow,aam-at/tensorflow,davidzchen/tensorflow,caisq/tensorflow,asimshankar/tensorflow,dendisuhubdy/tensorflow,freedomtan/tensorflow,apark263/tensorflow,frreiss/tensorflow-fred,alshedivat/tensorflow,ZhangXinNan/tensorflow,AnishShah/tensorflow,yongtang/tensorflow,ppwwyyxx/tensorflow,nburn42/tensorflow,renyi533/tensorflow,meteorcloudy/tensorflow,adit-chandra/tensorflow,renyi533/tensorflow,gojira/tensorflow,apark263/tensorflow,ppwwyyxx/tensorflow,Bismarrck/tensorflow,brchiu/tensorflow,adit-chandra/tensorflow,snnn/tensorflow,ZhangXinNan/tensorflow,alsrgv/tensorflow,davidzchen/tensorflow,brchiu/tensorflow,allenlavoie/tensorflow,aselle/tensorflow,jhseu/tensorflow,brchiu/tensorflow,asimshankar/tensorflow,paolodedios/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow,alshedivat/tensorflow,jalexvig/tensorflow,xzturn/tensorflow,kevin-coder/tensorflow-fork,xodus7/tensorflow,caisq/tensorflow,jendap/tensorflow,gautam1858/tensorflow,alsrgv/tensorflow,annarev/tensorflow,eaplatanios/tensorflow,eaplatanios/tensorflow,chemelnucfin/tensorflow,AnishShah/tensorflow,jbedorf/tensorflow,lukeiwanski/tensorflow,paolodedios/tensorflow,yanchen036/tensorflow,chemelnucfin/tensorflow,ageron/tensorflow,frreiss/tensorflow-fred,alshedivat/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,jalexvig/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,cxxgtxy/tensorflow,xzturn/tensorflow,cxxgtxy/tensorflow,DavidNorman/tensorflow,hfp/tensorflow-xsmm,asimshankar/tensorflow,drpngx/tensorflow,hehongliang/tensorflow,dancingdan/tensorflow,aam-at/tensorflow,jart/tensorflow,ghchinoy/tensorflow,Xeralux/tensorflow,jbedorf/tensorflow,alsrgv/tensorflow,aselle/tensorflow,AnishShah/tensorflow,lukeiwanski/tensorflow,yanchen036/tensorflow,brchiu/tensorflow,kevin-coder/tensorflow-fork,jalexvig/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,kobejean/tensorflow