Repository: pytorch
Issue: Output for `aten::_native_multi_head_attention` appears inconsistent with entry in `native_functions.yaml`
Labels: module: nn,triaged

### 🐛 Describe the bug

The following python code is an invocation of `aten::_native_multi_head_attention` that outputs a `(Tensor, None)` tuple.

```python
import torch

embed_dim = 8
num_heads = 4
bs = 4
sl = 2
qkv = torch.nn.Linear(embed_dim, embed_dim * 3, dtype=torch.float32)
proj = torch.nn.Linear(embed_dim, embed_dim, dtype=torch.float32)
q = torch.randn(bs, sl, embed_dim) * 10
k = torch.randn(bs, sl, embed_dim) * 10
v = torch.randn(bs, sl, embed_dim) * 10

mha = torch.ops.aten._native_multi_head_attention(
    q,
    k,
    v,
    embed_dim,
    num_heads,
    qkv.weight,
    qkv.bias,
    proj.weight,
    proj.bias,
    need_weights=False,
    average_attn_weights=False,
)

print(mha)

```

The following is an example output.

```
(tensor([[[ 1.6427,  2.0966,  2.4298,  1.6536,  2.9116, -0.6659,  0.0086,
           4.0757],
         [ 2.0386,  0.8152, -0.8718,  1.7295,  0.9999, -1.8865, -2.7697,
           1.9216]],

        [[ 4.0717,  0.0476, -0.6383,  3.1022, -2.5480,  2.0922, -4.1062,
          -0.5034],
         [ 2.3662,  0.3523, -1.0895,  1.9332,  0.3525,  0.4775, -2.1356,
           0.4972]],

        [[-5.0851,  3.8904,  2.9651, -3.1131,  6.5247, -2.5286, -1.4031,
           1.0763],
         [-2.5247,  1.5687, -1.5536,  1.0382,  4.8081, -2.2505,  1.6698,
           2.1023]],

        [[-1.7481,  1.0500,  2.4167, -1.5026,  5.5205, -3.3177,  3.3927,
           4.1006],
         [-3.4155,  2.5501,  4.6239, -8.3866,  4.6514, -2.5655,  5.8211,
           2.1764]]], grad_fn=<NotImplemented>), None)
```

Note that the second value in the returned tuple is `None`. This appears to contradict the entry for `_native_multi_head_attention` in `native_functions.yaml` which indicates that it will always return a tuple of tensors `(Tensor, Tensor)`.

```
 - func: _native_multi_head_attention(Tensor query, Tensor key, Tensor value, int embed_dim, int num_head, Tensor qkv_weight, Tensor qkv_bias, Tensor proj_weight, Tensor proj_bias, Tensor? mask=None, bool need_weights=True, bool average_attn_weights=True) -> (Tensor, Tensor)
   variants: function
   dispatch:
      CPU, CUDA, NestedTensorCPU, NestedTensorCUDA: native_multi_head_attention
```

Please let me know if I have misunderstood something regarding this function signature and this is intended behavior.

### Versions

```
PyTorch version: 1.12.0+cu102
Is debug build: False
CUDA used to build PyTorch: 10.2
ROCM used to build PyTorch: N/A

OS: Arch Linux (x86_64)
GCC version: (GCC) 12.1.0
Clang version: 13.0.1
CMake version: version 3.23.2
Libc version: glibc-2.35

Python version: 3.10.5 (main, Jun  6 2022, 18:49:26) [GCC 12.1.0] (64-bit runtime)
Python platform: Linux-5.18.5-arch1-1-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 2070 SUPER
Nvidia driver version: 515.48.07
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.23.0
[pip3] torch==1.12.0
[conda] Could not collect

```

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki @bhosmer @cpuhrsch @erichan1 @drisspg