def find_max_alignment(
    num_elements: int, dtype: str, accessors: List[TensorAccessor]
) -> int:
    """find the max alignment value that meets the requirement of accessing
       num_elements of data with access patterns (strides and offsets)
       specified by accessors

    Parameters
    ----------
    num_elements: int
        specify the number of elements being accessed
    dtype: str
        dtype of the tensor for which the accessors are attached

    accessors: List[TensorAccessor]
        TensorAccessor(s) attached to the relevant tensor being accessed

    Returns
    ----------
    int
        the max alignment value
    """
    # get initial alignment based on the number of elements being accessed
    align = alignment.find_max_alignment(num_elements, dtype)
    accessor_alignment = find_max_alignment_for_accessors(dtype, accessors)
    return min(align, accessor_alignment)
find the max alignment value that meets the requirement of accessing
num_elements of data with access patterns (strides and offsets)
specified by accessors

Parameters
----------
num_elements: int
specify the number of elements being accessed
dtype: str
dtype of the tensor for which the accessors are attached

accessors: List[TensorAccessor]
TensorAccessor(s) attached to the relevant tensor being accessed

Returns
----------
int
the max alignment value
python/aitemplate/backend/common/tensor_accessor_codegen.py