d-smirnov commented on a change in pull request #7114:
URL: https://github.com/apache/tvm/pull/7114#discussion_r544334819
##########
File path: python/tvm/relay/frontend/tflite.py
##########
@@ -174,17 +174,42 @@ def __init__(self, model, subgraph, exp_tab):
def check_unsupported_ops(self):
"""Check unsupported TFLite ops in our converter."""
unsupported_ops_set = set()
-
+ dynamic_range_ops_set = set()
for op_idx in range(self.subgraph.OperatorsLength()):
op = self.subgraph.Operators(op_idx)
op_code_str = self.get_op_code_str(op)
if op_code_str not in self.convert_map:
unsupported_ops_set.add(op_code_str)
+ continue
+
+ # Trying to exclude "dynamic range quantization" optimized ops as
not supported in TVM
+ qnn_in_cnt = len(
+ [_.qnn_params for _ in self.get_input_tensors(op)[1:] if
_.qnn_params is not None]
+ )
+ qnn_out_cnt = len(
+ [_.qnn_params for _ in self.get_output_tensors(op) if
_.qnn_params is not None]
+ )
+
+ if qnn_out_cnt == 0 and qnn_in_cnt > 0:
+ dynamic_range_ops_set.add(op_code_str)
Review comment:
I renamed the vars. Hope it is more explicit now
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]