I found the pass that removes the reshape operators. In my use case this is done inside the Codegen()
function inside the AOTExecutorCodegen
class. This function will use the pass called RemoveStandaloneReshapes()
. This pass seems to remove all but the first reshape in my use case.