Repository: pytorch
Issue: torch.fx cannot trace torch.Size() properly
Labels: triaged,module: fx

## 🐛 Bug

**`torch.fx`** traces **`torch.Tensor.size()`** as a strange proxy type that cannot be handled by **`torch.zeros()`** and some other torch functions which use dimension sizes as arguments. But strangely **`torch.Tensor.view()`** is an exception and works properly.

## To Reproduce

Steps to reproduce the behavior:

You can run the following python script to reproduce this error easily.

```py
import torch
import torch.nn as nn
import torch.fx as fx

class Example (nn.Module):
    def __init__(self) -> None:
        super(Example, self).__init__()

    def forward(self, input):

        batch_size = input.size(0)
        ch_size = input.size(1)

        return torch.zeros(batch_size, ch_size)
        # There is no error if I call torch.Tensor.view
        # return input.view(batch_size, ch_size, -1)

if __name__ == "__main__":

    model = Example()
    y = model(torch.randn(4, 5, 3, 3))
    print(y)

    fx_model = fx.symbolic_trace(model)
    fx_graph = fx_model.graph

    fx_graph.print_tabular()
    print(fx_model.code)
```
And the output is:
```
tensor([[0., 0., 0., 0., 0.],
        [0., 0., 0., 0., 0.],
        [0., 0., 0., 0., 0.],
        [0., 0., 0., 0., 0.]])
Traceback (most recent call last):
  File "trace_bug.py", line 22, in <module>
    fx_model = fx.symbolic_trace(model)
  File "/home/shengcn/anaconda3/envs/torch110/lib/python3.7/site-packages/torch/fx/_symbolic_trace.py", line 907, in symbolic_trace
    graph = tracer.trace(root, concrete_args)
  File "/home/shengcn/anaconda3/envs/torch110/lib/python3.7/site-packages/torch/fx/_symbolic_trace.py", line 615, in trace
    self.create_node('output', 'output', (self.create_arg(fn(*args)),), {},
  File "trace_bug.py", line 14, in forward
    return torch.zeros(batch_size, ch_size)
TypeError: zeros() received an invalid combination of arguments - got (Proxy, Proxy), but expected one of:
 * (tuple of ints size, *, tuple of names names, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)
 * (tuple of ints size, *, Tensor out, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)
```

## Expected behavior

This piece of code should work without any errors.

## Environment
```
PyTorch version: 1.10.0
Is debug build: False

OS: Ubuntu 18.04.6 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

Python version: 3.7.11 (default, Jul 27 2021, 14:32:16)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-4.15.0-161-generic-x86_64-with-debian-buster-sid

Versions of relevant libraries:
[pip3] numpy==1.21.2
[pip3] torch==1.10.0
[pip3] torchaudio==0.10.0
[pip3] torchvision==0.11.1
[conda] blas                      1.0                         mkl    defaults
[conda] cpuonly                   2.0                           0    pytorch
[conda] ffmpeg                    4.3                  hf484d3e_0    pytorch
[conda] mkl                       2021.3.0           h06a4308_520    defaults
[conda] mkl-service               2.4.0            py37h7f8727e_0    defaults
[conda] mkl_fft                   1.3.1            py37hd3c417c_0    defaults
[conda] mkl_random                1.2.2            py37h51133e4_0    defaults
[conda] numpy                     1.21.2           py37h20f2e39_0    defaults
[conda] numpy-base                1.21.2           py37h79a1101_0    defaults
[conda] pytorch                   1.10.0              py3.7_cpu_0    pytorch
[conda] pytorch-mutex             1.0                         cpu    pytorch
[conda] torchaudio                0.10.0                 py37_cpu  [cpuonly]  pytorch
[conda] torchvision               0.11.1                 py37_cpu  [cpuonly]  pytorch
```


cc @ezyang @SherlockNoMad