def all_static_dimensions(shape, from_dim: int = 0):
    """
    Return true if all dimensions starting from from_dim (inclusive)
    are static
    """
    from aitemplate.compiler.base import IntImm

    for dim in shape[from_dim:]:
        if not isinstance(dim, IntImm):
            return False
    return True

    Return true if all dimensions starting from from_dim (inclusive)
    are static
    
python/aitemplate/utils/shape_utils.py