Untrack eager tensors from GC during dealloc.
Untrack eager tensors from GC during dealloc.

We were seeing an issue where the item would be deleted, make a call to
ClearWeakRefs which seemingly dealloc'd the object (bypassing the call to
ClearWeakRefs?), and then would fail since we would try to re-delete things.

The base type dealloc mentions that clearing weakrefs with GC enabled for the object might be problematic. See https://github.com/python/cpython/blob/f78a5e9ce8f32a195f5f788aade79578437f30a6/Objects/typeobject.c#L1206-L1209

PiperOrigin-RevId: 240381495

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