Say I have a vector V with size m*n  and I want to sum over each consecutive m elements to get a vector with size n. What is the efficient way to do this? And also, what if the chunks that I want to sum are uneven (the widths are saved in a list or another tensor)?