Fix inplace variables
Created by: jmitrevs
Description
Inplace variables are broken in the main branch because they are fixed too early. Subsequent optimizations can make this connection no longer valid. Issue #707 (closed) (and the attempted fix in #708) is an example of this issue. This was largely developed in the ingest-qonnx-master
branch, but is extracted here, and an omission related to stream repacking for quartus was discovered and fixed.
Type of change
Bug fix
-
Bug fix (non-breaking change that fixes an issue) -
New feature (non-breaking change which adds functionality)
Tests
The pytest, test_reshape.py
, is the main test, though test_cnn_mnist.py
is also pertinent. The new reshape functionality for Intel needs testing, though. There is also the question of whether flatten can always be removed for io_stream. This should be checked further, and if exceptions are found, we may need to change when we run the optimizers.
Checklist
-
I have read the guidelines for contributing. -
I have commented my code, particularly in hard-to-understand areas. -
I have made corresponding changes to the documentation. -
My changes generate no new warnings. -
I have installed and run pre-commit
on the files I edited or added. -
I have added tests that prove my fix is effective or that my feature works. (May want to add another for Flatten. in various cases.)