input/output names cause issue for export
I am working on a case like this:
flowchart TD
ONNX1 --> CustomOp --> ONNX2
I have a script that was previously working but with current version it no longer work.
The script now produce an ONNX with no connexion between ONNX1 CustomOp and ONNX2.
This is due to the introduction of inputName and outputName.
Issue 1: Bad handling of nodes with no inputName
Indeed the CustomOp is defined inside my script and does not have a inputName. And since ONNX export now generate connections using this str the nodes are not linked in ONNX.
I have fixed this issue by changing inputName so that the name is defined like so:
- If the node has a parent, use parent.outputName
- If the node as a mOutputName for the inquired input use it
- The node generate an input by following the pattern:
{name}_in{IN_ID}
Issue 2: No handling of duplicate input/outputName
This solve the aforementioned issue, however I am now facing an other issue. In ONNX1 and ONNX2 some edges are named the same way. Creating an invalid graph when fusing them!
On going: finding an elegant solution for this