[aten][simple] Optimize atrepeat (#56994)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/56994
- Use `DimVector` in place of `std::vector<int64_t>` to remove heap allocations for tensors with ndim <= 5
- Use `sizes()[i]` in place of `size(i)` where we know i is positive
Test Plan: CI
Reviewed By: edvgha, swolchok
Differential Revision: D28022355
fbshipit-source-id: ef20ac73c0a330192ebc41ab9c92374ed8e2484a