diff --git a/paddle/fluid/operators/ngraph/ops/binary_unary_op.h b/paddle/fluid/operators/ngraph/ops/binary_unary_op.h index 2d11775849a778262dcd3e36ff35d8851fb350f1..36630b0c620382c48f5f044db36989f33bb4fb11 100644 --- a/paddle/fluid/operators/ngraph/ops/binary_unary_op.h +++ b/paddle/fluid/operators/ngraph/ops/binary_unary_op.h @@ -51,6 +51,7 @@ static void BuildUnaryNode( } // namespace operators } // namespace paddle +REGISTER_NG_OP(abs, BuildUnaryNode); REGISTER_NG_OP(relu, BuildUnaryNode); REGISTER_NG_OP(tanh, BuildUnaryNode); REGISTER_NG_OP(sigmoid, BuildUnaryNode); diff --git a/python/paddle/fluid/tests/unittests/ngraph/test_activation_ngraph_op.py b/python/paddle/fluid/tests/unittests/ngraph/test_activation_ngraph_op.py index 034d7792c13efb432e6bef6c95ee554584f29519..c7d62bd8ae1c8c30056192ee4217b22cfc3901db 100644 --- a/python/paddle/fluid/tests/unittests/ngraph/test_activation_ngraph_op.py +++ b/python/paddle/fluid/tests/unittests/ngraph/test_activation_ngraph_op.py @@ -18,7 +18,7 @@ import unittest import numpy as np import paddle.fluid.core as core from paddle.fluid.tests.unittests.op_test import OpTest -from paddle.fluid.tests.unittests.test_activation_op import TestSigmoid, TestRelu, TestTanh +from paddle.fluid.tests.unittests.test_activation_op import TestAbs, TestSigmoid, TestRelu, TestTanh class TestNGRAPHReluDim4(TestRelu):