masahi opened a new pull request #6327: URL: https://github.com/apache/incubator-tvm/pull/6327
This adds support for configuring the number of ops in one fused function. The motivation is for a use case like [hummingbird ](https://github.com/microsoft/hummingbird) where there can be unbounded number of operations fused into one function, depending on the dataset. This leads to huge compilation time. More details explained in https://discuss.tvm.ai/t/aggressive-operator-fusion-and-its-consequence-of-huge-inlined-tir-expression/7687 There is already a hard coded constant kMaxFusedOps and the condition to check the number of fused ops: https://github.com/apache/incubator-tvm/blob/a8e44710c6472a2ee5cb66283c7f5e77f4e4ca0d/src/relay/transforms/fuse_ops.cc#L82 https://github.com/apache/incubator-tvm/blob/a8e44710c6472a2ee5cb66283c7f5e77f4e4ca0d/src/relay/transforms/fuse_ops.cc#L678 But this condition is simply not correct, since for a diamond structure there are multiple paths connecting a child node (`group_node` above) and its dom parent. Correctly calculating the number of fused nodes requires more care, and I believe my implementation is correct. Please review @tqchen @zhiics ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
