Skip to content

Update inplace variables to not lose connection when source node is optimized. #525

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

Closed

Conversation

jmitrevs
Copy link
Contributor

In the original implementation, inplace variables are created when initializing an object, which can run into problems if the source node is changed due to optimizers. This PR moves the linking to a later stage, after the optimizations have run.

This is a replacement for #472, making use of the new features in the master branch.

@jmitrevs jmitrevs added the bug label Apr 12, 2022
@jmitrevs
Copy link
Contributor Author

I think I need to copy the type from the input_var in the InplaceTensorVariable.__init__. Let me test it a bit more extensively, though.

@jmitrevs
Copy link
Contributor Author

jmitrevs commented Jul 8, 2022

Some quartus-specific updates are in the QONNX PR #591. Should they be cherry-picked and added here, or is it fine to have them as part of that?

@jmitrevs
Copy link
Contributor Author

jmitrevs commented Jul 12, 2022

Actually, I see that #591 quite extensively modifies the code in this PR, so evaluating this PR independently I think is not useful. Extracting those changes is not very easy to do, either. Note how the optimizers have been reworked, with some going into fpga/passes. The structure of the InplaceTensorVariable hasn't changed in that PR, though. It may be worth looking at that. This variable type is only created in passes (backends/vivado/passes/inplace_stream_flatten.py and backends/fpga/passes/inplace_parallel_reshape.py in #569) and transform_types handles the transformations appropriately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant