nn.Parameter doesn’t seem to transfer any kind of grad information. One workaround that I could get to work was to use the torch.nn.functional API and passing the kernel through there.
def some_function(self):
    self.kernel = self.var1 + self.var2

def forward(self, x):
    self.some_function()
    output  = F.conv2d(x, self.kernel, padding = 0, stride = 1)

Here grad_fn works as usual.
You do have to figure out the kernel size by yourself though.