def to_dtype_handle(dtype):
    """
    Returns the pointer to the MPI dtype of the input numpy dtype
    """
    dtype_name = _np.dtype(dtype).name
    if dtype_name not in MPI_TYPE_MAP:
        raise RuntimeError(f"Unknown MPI type for dtype {dtype_name}")

    mpi_type = getattr(_MPI, MPI_TYPE_MAP[dtype_name])
    return to_mpi_handle(mpi_type)

    Returns the pointer to the MPI dtype of the input numpy dtype
    
mpi4jax/_src/utils.py