I think you could just use some view and permute ops.
Based on your description, I’ve created some dummy code using much smaller sizes, so that you can print the intermediate outputs and compare them to your reshaping logic:
a, b, c = 8, 6, 1  # initial size
columns = 2
rows = 4

x = torch.arange(a*b*c).view(a, b, c)
print(x)

y = x.view(rows, columns, -1)
print(y)

z = y.permute(0, 2, 1).contiguous().view(-1, columns)
print(z)