def get_dtype_size(dtype: str) -> int:
    """Returns size (in bytes) of the given dtype str.

    Parameters
    ----------
    dtype: str
        A data type string.

    Returns
    ----------
    int
        Size (in bytes) of this dtype.
    """

    if dtype not in _DTYPE2BYTE:
        raise KeyError(f"Unknown dtype: {dtype}. Expected one of {_DTYPE2BYTE.keys()}")
    return _DTYPE2BYTE[dtype]
Returns size (in bytes) of the given dtype str.

Parameters
----------
dtype: str
A data type string.

Returns
----------
int
Size (in bytes) of this dtype.
python/aitemplate/compiler/dtype.py