areusch opened a new pull request, #14665: URL: https://github.com/apache/tvm/pull/14665
I'm sending this PR to solicit feedback on this approach and am open to revisions or upstreaming parts of it into the `main` branch if needed. This PR makes it possible for Relax pipelines to keep track of which original Relax operators were fused into which PackedFunc. To accomplish this, it introduces a new IR node: MultiSpan, which contains an Array<Span>. , it subclasses Span. Therefore, in a MultiSpan instance, the `Span` fields should be ignored. A more proper way to do this would be to rename Span to e.g. SingleSpan, but this would create so many conflicts that it would need to happen upstream first. At the moment, this is only implemented in the FuseOps Relax pass. There will be limitations of this approach--for example, a `VarNode` referenced from multiple places in an IRModule will not be able to have distinct Spans. My interest here lies *only* in tracking this information in Relax functions where fusion and other "graph-level" transforms will occur, so I'm not sure I can justify doing something more elaborate such as introducing a new ObjectPath-based IR tracking facility. However, my hope is that the benefits are spelled out enough here to motivate a somewhat inferior approach as a starting point, and we can learn from this and improve as needed. Please let me know your thoughts. @junrushao @yelite @tqchen @masahi -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
