fix: index_fill_ formula to support duplicate indices (#57101)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/57006
Pull Request resolved: https://github.com/pytorch/pytorch/pull/57101
Reviewed By: gchanan
Differential Revision: D28076988
Pulled By: albanD
fbshipit-source-id: 1c1bd396282ca030b2445e4f3e1912f3c5a42b6c