Factor vector intrinsics out of SumKernel.cpp (#61483)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/61483
This will make it simpler to support AVX512 which is upcoming in #56992, see https://github.com/pytorch/pytorch/pull/56992#discussion_r667060280 for reference.
Test Plan: Imported from OSS
Reviewed By: mrshenli
Differential Revision: D29753536
Pulled By: ngimel
fbshipit-source-id: 03ae66cdc01a3679c67214468e2bdf93b15c3bc2