mars
mars copied to clipboard
Add a universal function to replace subgraph in OptimizationRule
This PR adds a univeral function replace_subgraph to OptimizationRule for later use. The unit test cases are added as well.
Fixes #3352
Check code requirements
- [x] tests added / passed (if needed)
- [x] Ensure all linting tests pass, see here for how to run them