torch.fx.passes.graph_manipulation.replace_target_nodes_with
- torch.fx.passes.graph_manipulation.replace_target_nodes_with(fx_module, old_op, old_target, new_op, new_target)
Modifies all nodes in fx_module.graph.nodes which match the specified op code and target, and updates them to match the new op code and target.