def allclose(x, y, rtol=1e-4, atol=1e-4):
    """Compares whether all elements are close.

    Parameters
    ----------
    x : Tensor
        First tensor
    y : Tensor
        Second tensor
    rtol : float, optional
        Relative tolerance
    atol : float, optional
        Absolute tolerance
    """
Compares whether all elements are close.

    Parameters
    ----------
    x : Tensor
        First tensor
    y : Tensor
        Second tensor
    rtol : float, optional
        Relative tolerance
    atol : float, optional
        Absolute tolerance
    
python/dgl/backend/backend.py