Skip to content

fuseGelu create an identity node

I am working on simplifying GeLU that are not well exported in ONNX by torch, see:

torch_gelu

However when I do so I am forced inside of aidge to keep an identity node:

gelu_cleaned

This is because the GeLU micro graph possess two inputs (which are the same). And there is to my knowledge no better way to represent this in Aidge than to use an Identity node.

I am not sure on how to remove this identity node with our graph formalism... Maybe we need a way to say that two inputs are the same?

If you have any ideas @pineapple @olivierbichler