[inductor][easy] reuse a single is_aligned function (#108135)
Resolve comment: https://github.com/pytorch/pytorch/pull/107722#discussion_r1308117422
Pull Request resolved: https://github.com/pytorch/pytorch/pull/108135
Approved by: https://github.com/jansel
ghstack dependencies: #107722