SIGN IN SIGN UP

add aten.sum.default (#2807)

Summary:
Pull Request resolved: https://github.com/pytorch/executorch/pull/2807

The operator `aten.sum.dim_IntList` could take an empty list as the parameter for `dims`. We modify `vulkan_graph_builder.py` to accommodate the empty list.

Moreover, the op `aten.sum.default` is implemented as a [decomposition](https://www.internalfb.com/code/fbsource/[96e496f9db8f92967b4394bd4f60e39ab916740b]/xplat/caffe2/torch/_decomp/decompositions.py?lines=4676) into `aten.sum.dim_IntList` with empty `dims`. So we will support `aten.sum.default` with the changes.

Context: `torch.sum(x, ())` and `torch.sum(x)` are two ways to compute the sum of all elements in tensor `x`.

Reviewed By: SS-JIA, jorgep31415

Differential Revision: D55630993

fbshipit-source-id: 923d276118e893ff6885b92eb7b4c7cb7a95b374
W
Wei Lu committed
b14570151fa36858e47c039764f3d98944bc605f
Parent: f0bfc3c
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 4/10/2024, 1:25:20 AM