def log_vandermonde_cuda(v, z, L):
    """ Wrap the cuda method to deal with shapes """
    v, z = torch.broadcast_tensors(v, z)
    shape = v.shape

    v = v.contiguous()
    z = z.contiguous()

    N = v.size(-1)
    assert z.size(-1) == N
    y = LogVandMultiplySymmetric.apply(v.view(-1, N), z.view(-1, N), L)
    y = y.view(*shape[:-1], L)
    return y
 Wrap the cuda method to deal with shapes 
analyze/convnexts4nd/extensions/kernels/vandermonde.py