MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / AvoidRecursiveCacheCall

Class AvoidRecursiveCacheCall

python/oneflow/nn/graph/cache.py:84–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82
83
84class AvoidRecursiveCacheCall(object):
85 def __init__(self, graph) -> None:
86 self._g = graph
87 self._prev_flag = self._g._run_with_cache
88
89 def __enter__(self):
90 self._g._run_with_cache = False
91
92 def __exit__(self, exc_type, exc_val, exc_tb):
93 self._g._run_with_cache = self._prev_flag
94
95
96class GraphCache(object):

Callers 4

__call__Method · 0.85
_compileMethod · 0.85
runtime_state_dictMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected