From 9b998764424d56d0deb06bf9c00455ac9a5987c6 Mon Sep 17 00:00:00 2001 From: pawelpiotrowicz <48519735+pawelpiotrowicz@users.noreply.github.com> Date: Thu, 30 May 2019 03:33:49 +0200 Subject: [PATCH] Enable less_than ngraph operator (#17642) * Enable less_than ngraph operator test=develop * Added compare unit-tests test=develop * Update: date && removed import test=develop --- .../operators/ngraph/ops/elementwise_node.h | 1 + .../ngraph/test_compare_ngraph_op.py | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 python/paddle/fluid/tests/unittests/ngraph/test_compare_ngraph_op.py diff --git a/paddle/fluid/operators/ngraph/ops/elementwise_node.h b/paddle/fluid/operators/ngraph/ops/elementwise_node.h index b6e09cfc6d8..7fd5e839002 100644 --- a/paddle/fluid/operators/ngraph/ops/elementwise_node.h +++ b/paddle/fluid/operators/ngraph/ops/elementwise_node.h @@ -72,3 +72,4 @@ REGISTER_NG_OP(elementwise_sub, BuildElementwiseBinaryNode); REGISTER_NG_OP(elementwise_min, BuildElementwiseBinaryNode); +REGISTER_NG_OP(less_than, BuildElementwiseCompareNode); diff --git a/python/paddle/fluid/tests/unittests/ngraph/test_compare_ngraph_op.py b/python/paddle/fluid/tests/unittests/ngraph/test_compare_ngraph_op.py new file mode 100644 index 00000000000..2f731a7693b --- /dev/null +++ b/python/paddle/fluid/tests/unittests/ngraph/test_compare_ngraph_op.py @@ -0,0 +1,23 @@ +# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from __future__ import print_function + +import unittest +import sys +sys.path.append("../") +import test_compare_op + +if __name__ == '__main__': + unittest.main() -- GitLab