You should registered a, b, c as nn.Parameter, and then do something like this:
class MyModel(nn.Module):
    def __init__(self, kernel):
        super(MyModel, self).__init__()
        # Other layers here
            
        # define a, b, c
        a, b, c = torch.randn(10), torch.randn(10), torch.randn(10)
        # register them as Parameters
        a, b, c = nn.Parameter(a), nn.Parameter(b), nn.Parameter(c)

    def forward(self, x):
        # Generate the custom kernel
        kernel = kernel_generator(a, b, c)
        x = torch.nn.functional.conv2d(x, kernel)
        # pass x to other modules
        return x

See the documentation for torch.nn.functional.conv2d here: https://pytorch.org/docs/stable/nn.functional.html?highlight=conv2d#torch.nn.functional.conv2d 6