未验证 提交 96e57967 编写于 作者: 姜永久 提交者: GitHub

rm mlu ops eager guard tests (#48769)

上级 5ecd0ad5
...@@ -21,7 +21,6 @@ import paddle ...@@ -21,7 +21,6 @@ import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
from op_test import OpTest from op_test import OpTest
from paddle.fluid.framework import _test_eager_guard
paddle.enable_static() paddle.enable_static()
......
...@@ -21,7 +21,6 @@ from op_test import OpTest ...@@ -21,7 +21,6 @@ from op_test import OpTest
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard from paddle.fluid import compiler, Program, program_guard
import paddle import paddle
from paddle.fluid.framework import _test_eager_guard
paddle.enable_static() paddle.enable_static()
......
...@@ -21,7 +21,6 @@ from op_test import OpTest, skip_check_grad_ci ...@@ -21,7 +21,6 @@ from op_test import OpTest, skip_check_grad_ci
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle import paddle
from paddle.fluid import compiler, Program, program_guard, core from paddle.fluid import compiler, Program, program_guard, core
from paddle.fluid.framework import _test_eager_guard
paddle.enable_static() paddle.enable_static()
......
...@@ -23,7 +23,7 @@ import paddle ...@@ -23,7 +23,7 @@ import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.core as core import paddle.fluid.core as core
import paddle.fluid.framework as framework import paddle.fluid.framework as framework
from paddle.fluid.framework import Program, program_guard, _test_eager_guard from paddle.fluid.framework import Program, program_guard
paddle.enable_static() paddle.enable_static()
...@@ -203,7 +203,6 @@ class TestOneHotOpApi(unittest.TestCase): ...@@ -203,7 +203,6 @@ class TestOneHotOpApi(unittest.TestCase):
one_hot_label = paddle.nn.functional.one_hot( one_hot_label = paddle.nn.functional.one_hot(
fluid.dygraph.to_variable(label), depth fluid.dygraph.to_variable(label), depth
) )
# with _test_eager_guard():
# one_hot_label = paddle.nn.functional.one_hot( # one_hot_label = paddle.nn.functional.one_hot(
# paddle.to_tensor(label), depth) # paddle.to_tensor(label), depth)
......
...@@ -24,7 +24,6 @@ sys.path.append("..") ...@@ -24,7 +24,6 @@ sys.path.append("..")
from op_test import OpTest from op_test import OpTest
from paddle.fluid.op import Operator from paddle.fluid.op import Operator
from paddle.fluid.executor import Executor from paddle.fluid.executor import Executor
from paddle.fluid.framework import _test_eager_guard
paddle.enable_static() paddle.enable_static()
...@@ -76,7 +75,6 @@ class TestTrunctedGaussianRandomOp(unittest.TestCase): ...@@ -76,7 +75,6 @@ class TestTrunctedGaussianRandomOp(unittest.TestCase):
# directly # directly
def gaussian_random_test_eager(self, place): def gaussian_random_test_eager(self, place):
with fluid.dygraph.guard(place): with fluid.dygraph.guard(place):
with _test_eager_guard():
out = paddle._C_ops.truncated_gaussian_random( out = paddle._C_ops.truncated_gaussian_random(
self.attrs["shape"], self.attrs["shape"],
self.attrs["mean"], self.attrs["mean"],
......
...@@ -25,7 +25,6 @@ from op_test import OpTest ...@@ -25,7 +25,6 @@ from op_test import OpTest
from paddle.fluid import compiler, Program, program_guard from paddle.fluid import compiler, Program, program_guard
from paddle.fluid.op import Operator from paddle.fluid.op import Operator
from paddle.fluid.backward import append_backward from paddle.fluid.backward import append_backward
from paddle.fluid.framework import _test_eager_guard
paddle.enable_static() paddle.enable_static()
......
...@@ -23,7 +23,6 @@ from paddle.fluid import core ...@@ -23,7 +23,6 @@ from paddle.fluid import core
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid.op import Operator from paddle.fluid.op import Operator
from paddle.fluid.executor import Executor from paddle.fluid.executor import Executor
from paddle.fluid.framework import _test_eager_guard
paddle.enable_static() paddle.enable_static()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册