Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove incorrect setting of result_t #1130

Merged
merged 2 commits into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion hls4ml/model/optimizer/passes/linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion hls4ml/model/optimizer/passes/merge_const.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 0 additions & 2 deletions hls4ml/model/optimizer/passes/quant_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading