def is_empty_rank1_tensor(shape) -> bool:
    """
    Return True if the input shape is empty
    """
    from aitemplate.compiler.base import IntImm

    return len(shape) == 1 and isinstance(shape[0], IntImm) and shape[0].value() == 0

    Return True if the input shape is empty
    
python/aitemplate/utils/shape_utils.py