tvm
tvm copied to clipboard
[Relax][Bugfix] Apply FuseOps to nested DataflowBlock
While it is ill-formed for control-flow to occur within a DataflowBlock, it is legal for a DataflowBlock to be contained within a control-flow. Prior to this commit, the FuseOps and FuseOpsByPattern transforms erroneously skipped DataflowBlock instances that were contained within a relax::If node.
This commit updates FuseOps to apply operator fusion to any dataflow block, regardless of whether it is found at the top level of a a Relax function.