Repository: pytorch
Issue: `torch.fx.operator_schemas.normalize_function` is too permissive
Labels: triaged,module: fx

### 🐛 Describe the bug

[`normalize_function`](https://github.com/pytorch/pytorch/blob/b72b5b2833a086417299849daebf51ab2ed0e76d/torch/fx/operator_schemas.py#L230) doesn't catch signature mismatches when [`len(matched_schemas) == 1`](https://github.com/pytorch/pytorch/blob/b72b5b2833a086417299849daebf51ab2ed0e76d/torch/fx/operator_schemas.py#L296).

Minimal repro follows.

Example schema:

```
aten::max_pool2d_with_indices(Tensor self, int[2] kernel_size, int[2] stride=[], int[2] padding=[0, 0], int[2] dilation=[1, 1], bool ceil_mode=False) -> (Tensor, Tensor)
```

```python
import torch
from torch.fx.node import map_aggregate
from torch.fx.operator_schemas import create_type_hint, normalize_function

target = torch.ops.aten.max_pool2d_with_indices.default

args = (torch.randn((1, 3, 32, 32)),)
arg_types = map_aggregate(args, type)
arg_types = tuple([create_type_hint(i) for i in arg_types])
kwargs={'kernel_size': [], 'stride': [], 'padding': [], 'dilation': [], 'ceil_mode': True}
kwarg_types = {k: create_type_hint(map_aggregate(v, type)) for k, v in kwargs.items()}

new_args_and_kwargs = normalize_function(
    target.overloadpacket, args, kwargs, arg_types, kwarg_types, normalize_to_only_use_kwargs=False
)
assert new_args_and_kwargs, "Couldn't normalize args and kwargs"
```

Note that commenting out the `elif len(matched_schemas) == 1:` branch leads to falling back to the `else:` branch, which does fail due to the more comprehensvive `type_matches(param.annotation, arg_type)` check.

cc @Chillee @silvasean @powderluv 

### Versions

```
Collecting environment information...
PyTorch version: 1.12.0.dev20220325
Is debug build: False
CUDA used to build PyTorch: 11.3
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.4 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: 10.0.0-4ubuntu1 
CMake version: version 3.21.2
Libc version: glibc-2.31

Python version: 3.9.7 (default, Sep 16 2021, 13:09:58)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.13.0-37-generic-x86_64-with-glibc2.31
Is CUDA available: True
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3080
Nvidia driver version: 510.39.01
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] functorch==0.2.0a0+6f3e137
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.22.3
[pip3] torch==1.12.0.dev20220325
[pip3] torchaudio==0.12.0.dev20220325
[pip3] torchtext==0.13.0.dev20220325
[pip3] torchvision==0.13.0.dev20220325
[pip3] torchviz==0.0.2
[conda] blas                      1.0                         mkl  
[conda] cudatoolkit               11.3.1               h2bc3f7f_2  
[conda] functorch                 0.2.0a0+1fa5434          pypi_0    pypi
[conda] mkl                       2021.4.0           h06a4308_640  
[conda] mkl-service               2.4.0            py39h7f8727e_0  
[conda] mkl_fft                   1.3.1            py39hd3c417c_0  
[conda] mkl_random                1.2.2            py39h51133e4_0  
[conda] mypy-extensions           0.4.3                    pypi_0    pypi
[conda] numpy                     1.22.3                   pypi_0    pypi
[conda] numpy-base                1.21.2           py39h79a1101_0  
[conda] pytorch                   1.12.0.dev20220325 py3.9_cuda11.3_cudnn8.3.2_0    pytorch-nightly
[conda] pytorch-mutex             1.0                        cuda    pytorch
[conda] torchaudio                0.12.0.dev20220325      py39_cu113    pytorch-nightly
[conda] torchtext                 0.13.0.dev20220325            py39    pytorch-nightly
[conda] torchvision               0.13.0.dev20220325      py39_cu113    pytorch-nightly
[conda] torchviz                  0.0.2                    pypi_0    pypi
```