Added scalar lists APIs for addcdiv and addcmul (#45932)
Summary:
1) Added new APIs:
_foreach_addcdiv(Tensor(a!)[] self, Tensor[] tensor1, Tensor[] tensor2, float[] scalars)
_foreach_addcdiv_(Tensor(a!)[] self, Tensor[] tensor1, Tensor[] tensor2, float[] scalars)
_foreach_addcmul(Tensor(a!)[] self, Tensor[] tensor1, Tensor[] tensor2, float[] scalars)
_foreach_addcmul_(Tensor(a!)[] self, Tensor[] tensor1, Tensor[] tensor2, float[] scalars)
2) Updated optimizers to use new APIs
Tested via unit tests
Pull Request resolved: https://github.com/pytorch/pytorch/pull/45932
Reviewed By: navahgar
Differential Revision: D24150306
Pulled By: izdeby
fbshipit-source-id: c2e65dedc95d9d81a2fdd116e41df0accb0b6f26