Could pytorch provide correlation operator?

To which extent is this topic a duplicate of Request for correlation layer?