def move_view_op_before_concat(
    sorted_graph: List[Tensor], wordir: str = None
) -> List[Tensor]:
    """
    This transformation turns "cat + view_op + cat" into "view_op + cat + cat".
    The yielded pattern may be optimized further by the transform_memory_ops pass.
    Note that this pass must be invoked before transform_strided_op_and_view_op
    and transform_strided_ops.
    """
    changed = True
    while changed:
        changed, sorted_graph = _move_view_op_before_concat(sorted_graph)
        if changed:
            sorted_graph = toposort(sorted_graph)
    return transform_utils.sanitize_sorted_graph(sorted_graph)
This transformation turns "cat + view_op + cat" into "view_op + cat + cat".
The yielded pattern may be optimized further by the transform_memory_ops pass.
Note that this pass must be invoked before transform_strided_op_and_view_op
and transform_strided_ops.
python/aitemplate/compiler/transform/move_view_ops.py