|
|
@ -19,6 +19,7 @@ import sys
|
|
|
|
import numpy as np
|
|
|
|
import numpy as np
|
|
|
|
from paddle.fluid import core
|
|
|
|
from paddle.fluid import core
|
|
|
|
from paddle.fluid import framework
|
|
|
|
from paddle.fluid import framework
|
|
|
|
|
|
|
|
from paddle.fluid.multiprocess_utils import CleanupFuncRegistrar
|
|
|
|
from .tracer import Tracer
|
|
|
|
from .tracer import Tracer
|
|
|
|
import logging
|
|
|
|
import logging
|
|
|
|
import objgraph
|
|
|
|
import objgraph
|
|
|
@ -134,6 +135,9 @@ def enable_dygraph(place=None):
|
|
|
|
_functional_dygraph_context_manager = guard(place=place)
|
|
|
|
_functional_dygraph_context_manager = guard(place=place)
|
|
|
|
_functional_dygraph_context_manager.__enter__()
|
|
|
|
_functional_dygraph_context_manager.__enter__()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# call disable_dygraph when Python exit
|
|
|
|
|
|
|
|
CleanupFuncRegistrar.register(disable_dygraph)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def disable_dygraph():
|
|
|
|
def disable_dygraph():
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|