Do not bind `c10::irange` output by reference (#79815)
First of all, binding integers by reference is slower than by value
Also, it makes no sense as `c10::irange` output does not have permanent storage and results in following compiler warning:
```
aten/src/ATen/core/function_schema.h:521:26: error: loop variable 'i' binds to a temporary value produced by a range of type 'integer_range<unsigned long>' [-Werror,-Wrange-loop-bind-reference]
for (const auto& i : c10::irange(1, default_val.size())) {
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79815
Approved by: https://github.com/kit1980, https://github.com/mehtanirav, https://github.com/bdhirsh