Add support for builtin sum (#52188)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/18627
Adds torch.sum support for JIT
Pull Request resolved: https://github.com/pytorch/pytorch/pull/52188
Test Plan:
python test/test_jit.py -k test_list_sum
python test/test_jit.py -k test_torch_sum
Reviewed By: pbelevich, anjali411
Differential Revision: D26670022
Pulled By: nikithamalgifb
fbshipit-source-id: eb58f0a3a64dab4b9fa1f4eb854e9854fa9bda55