Hi folks,

Consider the matrices A and B such that the shape of A is `torch.Size([4096, 25088, 8])`

and the shape of B is `torch.Size([256, 25088])`

. The final result I want to obtain is the matrix C resulted from the following `einsum`

operation

```
C = torch.einsum('bij,ki->bkj', A, B)
```

However, to get C, I want to compute sections of A and B, operate them using `einsum`

and then accumulating over the number of sections using `torch.sum`

. Now, consider A_sec with shape `torch.Size([4096, 196, 128, 8])`

and B_sec with shape `torch.Size([256, 196, 128])`

. In this case, I have 196 sections of 128 vectors. The same result is obtained doing

```
C = torch.einsum('bijk,lij->blk', A_sec, B_sec)
```

But, as mentioned before, I want to accumulate on the number of sections, something like

```
# THIS PIECE OF CODE IS WRONG!
C_sec = torch.einsum('bijk,lij->bilk', A_sec, B_sec)
C = torch.sum(C_sec, axis=1)
```

But this answer doesn’t provide the C matrix as before. What is wrong with what I did? What operations do I need to perform using `einsum`

to get the result I want?

Thanks