Here is a blog post 164 how to get from Python PyTorch function to ATen.
For CPU, this will get you to bmm_cpu 112 in LinearAlgebra.cpp. This in turn will call bmm_out_or_baddbmm_ 39 in the same file. For very small operands it has a (somewhat lame) kernel it calls, for larger (floating point) operands it dispatches to MKL if available or it will use several mv.
For cuda, you end in LinearAlgebra.cu 73 which (at the time of writing this) forwards to the THC legacy implementation baddbmm 43. For technical reasons (the old Torch7 “generic” macro based tensor dtype support) that in turn uses functions from THCBlas.cu 36 to finally dispatch to cuBlas or rocBlas.
Phew. Now I know why no one answered in the question you linked.
Best regards
Thomas