Draft PR : TBD
Candidate solution 1 shared : #654
Let's suppose we have a following graph and we want to remove output2.
```
input1 ---- op1 ---- output1
input2 --+
const1 ------------- output2
If we just remove `const1`, many errors occurred. It's because the graph signature still has `output2` and compiler wants to export `output2` even it has no tensor.
### Candidate Solutions
- Introducing `NoOp`
If we introduce `NoOp` and substitute `const1` to `NoOp`, we can prevent the errors by just adding the exporting codes that output whose `from()` is `NoOp` will not be exported.
input1 ---- op1 ---- output1
input2 --+
NoOp --------------- output2 (WILL NOT BE EXPORTED)
``
_NOTE_NoOp` is a virtual operation which does anything, and the name can be changed.
locooutput2. However, it looks difficult because there would be many changes for that.So the purpose if introducing NoOp is NOT TO export CircleOutput ?
@seanshpark I divided into two separate issues not to be confused. Thanks for your feedback :)
From now on, this issue only handle about NOT TO export CircleOutput.
Method 1) Introduce new IR, CircleNOP
Method 2) Add new attribute to existing CircleOutputDummy to ask CircleOutput is valid dangling output or should be removed
IR name for NoOP: CircleNOP, CircleNoOp, CircleDummy, ...
The reason for the error is that the index of the other output is not updated when the output is removed. So, it would be okay to update(#671)
I want to introduce a new IR to remove dangling output. However, I have no idea about the name...
CircleNOP : from assemblerCircleNoOp : from Tensorflow NoOpCircleNoneCircleNullHowever, I have no idea about the name...
Lets' go with CircleDummy
For me, CircleDummy is little confusing compared with CircleOutputDummy and I want to find a ward for explicitly indicating nullptr or There is no Tensor :(
By the way, CircleNoOp cannot be candidate because this word already used.
https://github.com/Samsung/ONE/blob/58ef972c9147d2f73d33d931e0a49f4ff91df7a7/compiler/luci/export/src/CircleOperationExporter.cpp#L1005-L1024
From now on, this issue only handle about NOT TO export CircleOutput.
For me, CircleDummy is little confusing compared with CircleOutputDummy
How about using CircleOutputExclude or CircleOutputErase or CircleOutputRemove or CircleOutputCancel ...
@seanshpark
How about using CircleOutputExclude or CircleOutputErase or CircleOutputRemove or CircleOutputCancel ...
CircleOutputExclude I like it!
Done!