How to add my custom Relay node to pattern matcher? [EthosU example]

@manupa-arm @mbaret

So maybe I can ask more directly.

Is the ordering of first pattern matching your offloadable and then replacing, within the extracted composite, the native relay operators with your new ethosu.conv2d relay operator a solution to not being able to do what I said before?

The following would feel like a simpler pipeline

  1. Find and replace in the main Relay module the native Relay op pattern which describes your ethosu.<operator> (just like you did it in your legalization process)
  2. PartitionGraph given that ethosu.<operator> is offloadable
  3. Relay-TIR now works like you already have it