Extending PyTorch conv1d and conv2d

I have the torch on Anaconda
I have a small change in the part where the input and weights of the mask do the cross-correlation operator, and I don’t know where the Implementation of that to extend it by my custom idea.
I need the part that every time in the slip of the window on the input obtained and I want to do something with it before applying cross-correlation to it and mask.
Could you please help me:
1- to find the implementation section I explained earlier
2- how to extend conv1d and conv2d