Creating rbf kernel matrices in a batched manner

I would like to create the rbf kernel matrix for a given batch of matrices. Currently, I am iterating in a loop for the batch. Is there a way to do this in a batched manner?