Implement conv between two matrix with integer precision

Dear all,

for my research I need to perform convolution operation between two 2d matrix. I tried using torch.nn.quantized.functional.conv2d(data.unsqueeze(0).unsqueeze(0), wq.unsqueeze(0).unsqueeze(0), scale = 1.0,bias=None)
unsqueezing the first two dimension because torch.nn.quantized.functional.conv2d requires 4d tensors, The problem is that doing like this this operation is quite slow. Is there a function that implement the convolution between two matrices using integer operation directly?

Thanks in advanced,

Max