Based on your description it seems as if you would like to apply the kernels to a single location and shift each kernel by 1?
If so, you could e.g. apply a standard convolution and get the diagonal of the result:
x = torch.tensor([[[[1., 0., 1., 1., 0.]]]])
conv = nn.Conv2d(1, 3, kernel_size=(1, 3), bias=False)

with torch.no_grad():
    weight = torch.tensor([[[[0.1, 0.2, 0.1]]], [[[0.1, 0., 0.]]], [[[0, 0.2, 0]]]])
    conv.weight.copy_(weight)

out = conv(x)
out[:, torch.arange(3), :, torch.arange(3)]

or unfold the input and use a matrix multiplication to get the desired results.