Your conv layer has also a bias, which you would see in the output.
Use self.cv1 = torch.nn.Conv2d(1, 2, (3, 3), padding=(0, 0), bias=False) and you would get closer to the expected results.
Once this is  solved, your output would still not contain all zeros, as you have a typo here:
        sob_kernel2 = torch.tensor([[1, 2, 1],
                                    [0, 0, 0],
                                    [-1, -2, 1]], dtype=torch.float64).unsqueeze(0).unsqueeze(0)

and would need to fix the sign of the last element.