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
- 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) - PartitionGraph given that
ethosu.<operator>
is offloadable - Relay-TIR now works like you already have it