suppose the shape of x is [2, num_channels, 4, 5], and I compute per-channel summation as follows:

s = torch.zeros(num_channels)
for i in range(num_channels):
s[i] = x[:, i].sum()

It turns out this implement is too slow. Is there a faster implement?