enable s8 concatv2
@@ -36,12 +36,14 @@ class FuseNodeStartWithConcatV2(QuantizeNodeBase):
min_names = []
max_names = []
for original_input_name in original_inputs:
+ original_input_node = self.node_name_mapping[original_input_name].node
+ input_data_type = dtypes.quint8 if self._find_relu_node(original_input_node) else dtypes.qint8
quantize_input_name, min_input_name, max_input_name = (
self._eightbitize_input_to_node(namespace_prefix,
original_input_name,
reshape_dims_name,
reduction_dims_name,
- dtype=dtypes.quint8))
+ dtype=input_data_type))
input_names.append(quantize_input_name)
min_names.append(min_input_name)
max_names.append(max_input_name)
@@ -53,9 +55,9 @@ class FuseNodeStartWithConcatV2(QuantizeNodeBase):
quantized_concat_name,
all_input_names)
helper.set_attr_int(quantized_concat_node, "N", len(original_inputs))
- helper.set_attr_dtype(quantized_concat_node, "T", dtypes.quint8)
+ helper.set_attr_dtype(quantized_concat_node, "T", input_data_type)
self.add_output_graph_node(quantized_concat_node)
- self._intel_cpu_add_dequantize_result_node(quantized_concat_name, original_node.name)
+ self._intel_cpu_add_dequantize_result_node(quantized_concat_name, original_node.name, input_data_type)
def _quantizable_concat(self, node):
deq_type = []
