AlexNet was too big for one 3GB GPU, so half of each layer's kernels lived on each of two GPUs. In most convolutional layers a kernel only sees the feature maps on its own GPU: a convolution with groups. Only some layers connect across the split. Implement the grouped convolution and count what the split saves.
grouped_conv(x, w, groups)
x has shape (C_in, H, W); w has shape (C_out, C_in // groups, kh, kw). Stride 1, no padding, no bias; return shape (C_out, H - kh + 1, W - kw + 1).groups consecutive blocks of C_in // groups, output channels into groups consecutive blocks of C_out // groups. Output channel o belongs to group g = o // (C_out // groups) and sees only input block g:
groups = 1 this is an ordinary convolution (cross-correlation, as in deep learning libraries).kernel_weights(c_in, c_out, k, groups)
k x k layer from c_in to c_out channels with groups groups (no biases).C_in // groups, not C_in. That is the "48" in AlexNet's 5 x 5 x 48 second-layer kernels.groups.