Skip to content

Commit 4fae71a

Browse files
committed
[TFLite] Quantized unary elemwise ops
1 parent 48793f3 commit 4fae71a

File tree

2 files changed

+194
-332
lines changed

2 files changed

+194
-332
lines changed

python/tvm/relay/frontend/tflite.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,36 +1141,22 @@ def convert_abs(self, op):
11411141

11421142
def convert_ceil(self, op):
11431143
"""Convert TFLite CEIL"""
1144-
if self.is_quantized(op):
1145-
raise tvm.error.OpNotImplemented("TFlite quantized CEIL operator is not supported yet.")
11461144
return self._convert_unary_elemwise(_op.ceil, op)
11471145

11481146
def convert_floor(self, op):
11491147
"""Convert TFLite FLOOR"""
1150-
if self.is_quantized(op):
1151-
raise tvm.error.OpNotImplemented(
1152-
"TFlite quantized FLOOR operator is not supported yet."
1153-
)
11541148
return self._convert_unary_elemwise(_op.floor, op)
11551149

11561150
def convert_round(self, op):
11571151
"""Convert TFLite ROUND"""
1158-
if self.is_quantized(op):
1159-
raise tvm.error.OpNotImplemented(
1160-
"TFlite quantized ROUND operator is not supported yet."
1161-
)
11621152
return self._convert_unary_elemwise(_op.round, op)
11631153

11641154
def convert_exp(self, op):
11651155
"""Convert TFLite EXP"""
1166-
if self.is_quantized(op):
1167-
raise tvm.error.OpNotImplemented("TFlite quantized EXP operator is not supported yet.")
11681156
return self._convert_unary_elemwise(_op.exp, op)
11691157

11701158
def convert_log(self, op):
11711159
"""Convert TFLite LOG"""
1172-
if self.is_quantized(op):
1173-
raise tvm.error.OpNotImplemented("TFlite quantized LOG operator is not supported yet.")
11741160
return self._convert_unary_elemwise(_op.log, op)
11751161

11761162
def convert_sin(self, op):
@@ -1179,14 +1165,10 @@ def convert_sin(self, op):
11791165

11801166
def convert_tan(self, op):
11811167
"""Convert TFLite TAN"""
1182-
if self.is_quantized(op):
1183-
raise tvm.error.OpNotImplemented("TFlite quantized TAN operator is not supported yet.")
11841168
return self._convert_unary_elemwise(_op.tan, op)
11851169

11861170
def convert_cos(self, op):
11871171
"""Convert TFLite COS"""
1188-
if self.is_quantized(op):
1189-
raise tvm.error.OpNotImplemented("TFlite quantized COS operator is not supported yet.")
11901172
return self._convert_unary_elemwise(_op.cos, op)
11911173

11921174
def convert_sqrt(self, op):

0 commit comments

Comments
 (0)