diff --git a/python/paddle/fluid/tests/unittests/test_layout_autotune.py b/python/paddle/fluid/tests/unittests/test_layout_autotune.py index bd73d9526c0ef33303320106bbbdf57c018f3735..d29f47c8ab11d8fc6f745c26b8017df0b5ba8cca 100644 --- a/python/paddle/fluid/tests/unittests/test_layout_autotune.py +++ b/python/paddle/fluid/tests/unittests/test_layout_autotune.py @@ -20,6 +20,9 @@ import tempfile import warnings import json import os +from paddle.fluid.framework import _enable_legacy_dygraph + +_enable_legacy_dygraph() class SimpleNet(paddle.nn.Layer):