def is_static_dimension(shape, dim: int) -> bool:
    """
    Return true if shape[dim] is static
    """
    from aitemplate.compiler.base import IntImm

    return dim <= len(shape) and isinstance(shape[dim], IntImm)
Return true if shape[dim] is static
python/aitemplate/utils/shape_utils.py