-
Notifications
You must be signed in to change notification settings - Fork 422
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
Added support for QONNX Resize
node ingestion and tested with tiny UNet model
#1122
Conversation
…_model_ch_last.onnx`
hls4ml/backends/fpga/passes/clone.py
Outdated
@@ -87,7 +87,7 @@ def transform(self, model, node): | |||
) | |||
for i in range(len(output_map[output])): | |||
key = output + '_cpy' + str(i + 1) | |||
clone_layer.attributes[key].type = node.attributes['result_t'] | |||
clone_layer.attributes[key].type = node.get_output_variable().type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this identical?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the output of the tests if you run the code with the original line:
def match(self, node):
if isinstance(node, (Pooling1D, Pooling2D, GlobalPooling1D, GlobalPooling2D)) and node.get_attr('pool_op') == 'Max':
> return isinstance(node.get_input_variable().type.precision, XnorPrecisionType) and not isinstance(
node.get_output_variable().type.precision, XnorPrecisionType
)
E AttributeError: 'FixedPrecisionType' object has no attribute 'precision'
hls4ml/backends/fpga/passes/xnor_pooling.py:14: AttributeError
Solved if you update it as proposed.
…onsidered node, in case the input is empty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, this now includes part (but not all) of #1130. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed all the comments, let me know if there's anything else to address. I see the pipeline failed but again it was due to the large time taken by some tests
Description
All the necessary parts are added in order to properly ingest QONNX models containing
Resize
nodeType of change
Extended the capability of QONNX ingestion of hls4ml
Tests
I added two tests based on tiny UNet model in
test_qonnx.py
and one based on a simpler model taken from tiny UNet model. They have been both added inpytest
directory.Checklist
pre-commit
on the files I edited or added.