Should be the same:
import torch
import torch.nn.functional as F
import torch.nn as nn

filter = torch.randn(1,1,3,3)
inputs = torch.randn(1,1,5,5)
o1=F.conv2d(inputs, filters, padding=0, bias=None)
print(o1)
# using nn.Conv2d
print(filters.size())
fc = filters.transpose(2,3) 
print(fc.size()) 
# corss-correlation
conv = nn.Conv2d(1,1,kernel_size=3,padding=0, bias=False)
conv.weight = nn.Parameter(filters) 
o2=conv(inputs)
print(o2)
# convolution
conv.weight = nn.Parameter(fc) 
o3=conv(inputs)
print(o3)

Out:
tensor([[[[ 1.9127,  0.5849, -2.8391],
          [-0.8041, -2.4248, -7.8349],
          [ 2.3626,  0.1699,  4.0892]]]])
torch.Size([1, 1, 3, 3])
torch.Size([1, 1, 3, 3])
tensor([[[[ 1.9127,  0.5849, -2.8391],
          [-0.8041, -2.4248, -7.8349],
          [ 2.3626,  0.1699,  4.0892]]]], grad_fn=<MkldnnConvolutionBackward>)
tensor([[[[-3.8473,  4.5131, -4.5969],
          [-0.7352,  2.9420, -4.2360],
          [ 0.4477, -0.3692, -1.1258]]]], grad_fn=<MkldnnConvolutionBackward>)

The third output is if you would like to use real convolution.