Skip to content

Commit

Permalink
[EZ] [ONNX] Remove unnecessary converters for greater and lesser (#8967)
Browse files Browse the repository at this point in the history
* simplify by removing unneeded conversions

* remove uneeded

* remove test

Co-authored-by: Andrew Zhao Luo <andrewzhaoluo@system76-pc.localdomain>
  • Loading branch information
AndrewZhaoLuo and Andrew Zhao Luo authored Sep 9, 2021
1 parent 1bebd0a commit 548675f
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions python/tvm/relay/frontend/onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -1611,22 +1611,6 @@ def _impl_v9(cls, inputs, attr, params):
return _op.scatter_nd(zeros, _op.stack([indices, indices + k], axis=0), ones, "update")


class Greater(OnnxOpConverter):
"""Operator logical greater."""

@classmethod
def _impl_v7(cls, inputs, attr, params):
return _op.greater(inputs[0], inputs[1])


class Less(OnnxOpConverter):
"""Operator logical less than."""

@classmethod
def _impl_v7(cls, inputs, attr, params):
return _op.less(inputs[0], inputs[1])


class LRN(OnnxOpConverter):
"""Operator converter for Local Response Normalization."""

Expand Down Expand Up @@ -3655,8 +3639,8 @@ def _get_convert_map(opset):
"Selu": Selu.get_converter(opset),
"Elu": Elu.get_converter(opset),
"Exp": Renamer("exp"),
"Greater": Greater.get_converter(opset),
"Less": Less.get_converter(opset),
"Greater": Renamer("greater"),
"Less": Renamer("less"),
"Log": Renamer("log"),
"Acos": Renamer("acos"),
"Acosh": Renamer("acosh"),
Expand Down

0 comments on commit 548675f

Please sign in to comment.