Matrix Multiply along one dimension, broadcasting batches


I am currently trying to do a matrix multiplication of two matrices A of size b x l x k and B of size l x k x p, such that I get a matrix C of size b x l x p with C[i,j,:] = A[i,j,:] dot B[j,:,:], i=1,…,b and j=1,…,l.
Essentially what I need is a mixture of broadcasted matmul and bmm, that is, I want a matrix multiplication of A and B for each slice j=1,…,l and broadcasted to the batches b.

Thanks in advance!