[go: nahoru, domu]

Skip to content

Commit

Permalink
Fix a bug that tries to access RUNTIME_FUNCTION_REFS after deletion
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 639138453
  • Loading branch information
tensorflower-gardener committed May 31, 2024
1 parent 6a8281f commit 0a9e492
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ def __del__(self):
if self._generated_graph:
func_graph_module.dismantle_func_graph(self._generated_graph)

if RUNTIME_FUNCTION_REFS is None:
pass

key = (self._bound_context.function_scope_id, self.name)
RUNTIME_FUNCTION_REFS[key] -= 1
if RUNTIME_FUNCTION_REFS[key] < 0:
Expand Down

0 comments on commit 0a9e492

Please sign in to comment.