def replace_inplace_ops(
    module: torch.fx.GraphModule,
) -> torch.fx.GraphModule:
    """
    Remove this func after functionalization is workable
    """
    modified = False
    map_func = {
        torch.ops.aten.relu_.default: torch.ops.aten.relu.default,
        torch.ops.aten.hardtanh_.default: torch.ops.aten.hardtanh.default,
        torch.ops.aten.add_.Tensor: torch.ops.aten.add.Tensor,
    }
    for n in module.graph.nodes:
        if n.op == "call_function" and n.target in map_func.keys():
            modified = True
            node = n
            with module.graph.inserting_after(node):
                new_args = node.args
                new_node = module.graph.create_node(
                    "call_function",
                    map_func[node.target],
                    args=new_args,
                    kwargs=None,
                )
                node.replace_all_uses_with(new_node)
                module.graph.erase_node(node)
    module.graph.eliminate_dead_code()
    module.recompile()
    return PassResult(module, modified)

    Remove this func after functionalization is workable
    
fx2ait/fx2ait/passes/lower_basic_pass_aten.py