diff --git a/hls4ml/model/optimizer/passes/linear.py b/hls4ml/model/optimizer/passes/linear.py index b1aee7adc..ce0308eb6 100644 --- a/hls4ml/model/optimizer/passes/linear.py +++ b/hls4ml/model/optimizer/passes/linear.py @@ -40,7 +40,6 @@ def transform(self, model, node): # if the activation has a quantizer (usually from a QONNX Quant node), set the previous node's output precision if quantizer is not None: prev_node.set_attr("quantizer", quantizer) - prev_node.types['result_t'] = quantizer.hls_type prev_node.get_output_variable().type.precision = quantizer.hls_type model.remove_node(node) return True diff --git a/hls4ml/model/optimizer/passes/merge_const.py b/hls4ml/model/optimizer/passes/merge_const.py index a75ed27ac..bdf744783 100644 --- a/hls4ml/model/optimizer/passes/merge_const.py +++ b/hls4ml/model/optimizer/passes/merge_const.py @@ -54,7 +54,6 @@ def transform(self, model, node): const_node0.set_attr('quantizer', quantizer) # overwrite the quantizer if quantizer: const_node0.set_attr('quantizer', quantizer) - const_node0.types['result_t'] = quantizer.hls_type const_node0.get_output_variable().type.precision = quantizer.hls_type const_node0.set_attr('value', new_val) diff --git a/hls4ml/model/optimizer/passes/quant_opt.py b/hls4ml/model/optimizer/passes/quant_opt.py index cac29b504..e2e3d1401 100644 --- a/hls4ml/model/optimizer/passes/quant_opt.py +++ b/hls4ml/model/optimizer/passes/quant_opt.py @@ -194,7 +194,6 @@ def transform(self, model, node): const_node = node.get_input_node(node.inputs[0]) const_node.set_attr('quantizer', quantizer) - const_node.set_attr('result_t', precision) const_node.get_output_variable().type.precision = precision # Should we update the configuration to reflect the new precision? I don't think it's necessary @@ -331,7 +330,6 @@ def transform(self, model, node): const_node.set_attr('value', new_val) const_node.set_attr('quantizer', quantizer) - const_node.types['result_t'].precision = precision const_node.get_output_variable().type.precision = precision inshape = node.get_input_variable().shape