One way to do this is using torch.einsum:
import torch
x = torch.randn(2,3)
A = torch.randn(2,2,3)
res = torch.einsum('abc,ac -> ab', A, x)

assert torch.allclose(torch.matmul(A[0], x[0]), res[0])
assert torch.allclose(torch.matmul(A[1], x[1]), res[1])