I’m afraid you have to implement the convolution yourself in python using the already available pytorch functions as the Convolutions are implemented in C.
Alternatively you could have a look at the C-Implementation which can be found here 109 and check whether it would be easier to modify this implementation. On this 72 tutorial page you can find examples towards how to extend pytorch.
I think the best approach would be to write your own autograd function as suggested in this post 82