Use correct type of indices in ForeachUtils.h (#119116)
Fix a type mismatch detected by MSVC:
```
C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.39.33519\include\xutility(255): warning C4267: “初始化”: 从“size_t”转换到“_Ty”,可能丢失数据
with
[
_Ty=int
]
C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.39.33519\include\xutility(255): note: 模板实例化上下文(最早的实例化上下文)为
pytorch/aten/src\ATen/native/ForeachUtils.h(363): note: 查看对正在编译的函数 模板 实例化“_Ty &std::vector<_Ty,std::allocator<_Ty>>::emplace_back<const I&>(const I &)”的引用
with
[
_Ty=int,
I=size_t
]
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/119116
Approved by: https://github.com/Skylion007