Thanks @ptrblck . The following code
a = torch.rand(4, 3, 8, 8)
b = torch.ones(3, 3, 3, 3)
out = torch.conv2d(a, b, groups=3)

gives this bug:

RuntimeError: Given groups=3, weight of size 3 3 3 3, expected input[4, 3, 8, 8] to have 9 channels, but got 3 channels instead