def _make_op_names_unique(graph: List[Tensor]) -> Dict[str, str]:
    """
    To avoid ODR issues, we rename all ops in the constant folding subgraph.
    ODR issues can arise if two ops end up sharing the same name & implementation (which
    can actually happen, e.g. in the proposal op).
    """
    new_name_to_old = {}
    for tensor in graph:
        for op in tensor._attrs["src_ops"]:
            if op._attrs["name"] not in new_name_to_old:
                new_name = f"{op._attrs['name']}_constant_folding"
                new_name_to_old[new_name] = op._attrs["name"]
                op._attrs["name"] = new_name
    return new_name_to_old

    To avoid ODR issues, we rename all ops in the constant folding subgraph.
    ODR issues can arise if two ops end up sharing the same name & implementation (which
    can actually happen, e.g. in the proposal op).
    
python/aitemplate/compiler/transform/constant_folding.py