Skip to content

Commit e778ed3

Browse files
authored
Merge pull request #1130 from fastmachinelearning/result_t_bug_fix
remove incorrect setting of result_t
2 parents 51cb83c + 18fc2b8 commit e778ed3

File tree

3 files changed

+0
-4
lines changed

3 files changed

+0
-4
lines changed

hls4ml/model/optimizer/passes/linear.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ def transform(self, model, node):
4040
# if the activation has a quantizer (usually from a QONNX Quant node), set the previous node's output precision
4141
if quantizer is not None:
4242
prev_node.set_attr("quantizer", quantizer)
43-
prev_node.types['result_t'] = quantizer.hls_type
4443
prev_node.get_output_variable().type.precision = quantizer.hls_type
4544
model.remove_node(node)
4645
return True

hls4ml/model/optimizer/passes/merge_const.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ def transform(self, model, node):
5454
const_node0.set_attr('quantizer', quantizer) # overwrite the quantizer
5555
if quantizer:
5656
const_node0.set_attr('quantizer', quantizer)
57-
const_node0.types['result_t'] = quantizer.hls_type
5857
const_node0.get_output_variable().type.precision = quantizer.hls_type
5958
const_node0.set_attr('value', new_val)
6059

hls4ml/model/optimizer/passes/quant_opt.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ def transform(self, model, node):
194194

195195
const_node = node.get_input_node(node.inputs[0])
196196
const_node.set_attr('quantizer', quantizer)
197-
const_node.set_attr('result_t', precision)
198197
const_node.get_output_variable().type.precision = precision
199198

200199
# 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):
331330
const_node.set_attr('value', new_val)
332331
const_node.set_attr('quantizer', quantizer)
333332

334-
const_node.types['result_t'].precision = precision
335333
const_node.get_output_variable().type.precision = precision
336334

337335
inshape = node.get_input_variable().shape

0 commit comments

Comments
 (0)