Replace torch.chain_matmul calls to torch.linalg.multi_dot (#55064)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/55064
Test Plan: Imported from OSS
Reviewed By: glaringlee
Differential Revision: D27469261
Pulled By: heitorschueroff
fbshipit-source-id: 4a53cb058babc81f93f159747b4ed2b6c985a0bc