RuntimeError: Cannot call sizes() on tensor with symbolic sizes/strides w/ `dynamo.export`, `make_fx` and `functionalize`
Labels: triaged, module: functionalization, oncall: pt2, module: export

### Latest update

This is the most distilled repro. 

```python
import torch
import torch._dynamo
import torch.func
from torch.fx.experimental import proxy_tensor
from torch._dispatch.python import enable_python_dispatcher

def func(x, y):
    return torch.matmul(x, y)

x = torch.randn(2, 4, 3, 4)
y = torch.randn(2, 4, 4, 3)

with enable_python_dispatcher():
    # RuntimeError: Cannot call sizes() on tensor with symbolic sizes/strides
    gm = proxy_tensor.make_fx(torch.func.functionalize(func), tracing_mode="symbolic")(x, y)
```

Below is original issue post before further discussion.

### 🐛 Describe the bug

Distilled repro, greatly appreciate hints how to approach/debug this.

```python
import torch
import torch._dynamo
import torch.func
from torch.fx.experimental import proxy_tensor

def func(x, y):
    return torch.matmul(x, y.transpose(-1, -2))

x = torch.randn(2, 4, 3, 4)
y = torch.randn(2, 4, 3, 4)


gm, _ = torch._dynamo.export(func, x, y)
gm.print_readable()
gm = proxy_tensor.make_fx(torch.func.functionalize(gm), tracing_mode="symbolic")(x, y)
gm.print_readable()
```

```
Traceback (most recent call last):
  File "/home/bowbao/pytorch_dev/torch/fx/graph_module.py", line 271, in __call__
    return super(self.cls, obj).__call__(*args, **kwargs)  # type: ignore[misc]
  File "/home/bowbao/pytorch_dev/torch/fx/_symbolic_trace.py", line 756, in module_call_wrapper
    return self.call_module(mod, forward, args, kwargs)
  File "/home/bowbao/pytorch_dev/torch/fx/experimental/proxy_tensor.py", line 433, in call_module
    return forward(*args, **kwargs)
  File "/home/bowbao/pytorch_dev/torch/fx/_symbolic_trace.py", line 749, in forward
    return _orig_module_call(mod, *args, **kwargs)
  File "/home/bowbao/pytorch_dev/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "<eval_with_key>.3", line 7, in forward
    matmul = torch.matmul(arg0, transpose);  arg0 = transpose = None
RuntimeError: Cannot call sizes() on tensor with symbolic sizes/strides

Call using an FX-traced Module, line 7 of the traced Module's generated forward function:
    transpose = arg1.transpose(-1, -2);  arg1 = None
    matmul = torch.matmul(arg0, transpose);  arg0 = transpose = None

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
    return pytree.tree_unflatten([matmul], self._out_spec)

    

Traceback (most recent call last):
  File "repro_simpler_func_dynamic.py", line 15, in <module>
    gm = proxy_tensor.make_fx(torch.func.functionalize(gm), tracing_mode="symbolic")(x, y)
  File "/home/bowbao/pytorch_dev/torch/fx/experimental/proxy_tensor.py", line 771, in wrapped
    t = dispatch_trace(wrap_key(func, args, fx_tracer, pre_autograd), tracer=fx_tracer, concrete_args=tuple(phs))
  File "/home/bowbao/pytorch_dev/torch/_dynamo/eval_frame.py", line 252, in _fn
    return fn(*args, **kwargs)
  File "/home/bowbao/pytorch_dev/torch/fx/experimental/proxy_tensor.py", line 467, in dispatch_trace
    graph = tracer.trace(root, concrete_args)
  File "/home/bowbao/pytorch_dev/torch/_dynamo/eval_frame.py", line 252, in _fn
    return fn(*args, **kwargs)
  File "/home/bowbao/pytorch_dev/torch/fx/_symbolic_trace.py", line 778, in trace
    (self.create_arg(fn(*args)),),
  File "/home/bowbao/pytorch_dev/torch/fx/experimental/proxy_tensor.py", line 484, in wrapped
    out = f(*tensors)
  File "<string>", line 1, in <lambda>
  File "/home/bowbao/pytorch_dev/torch/_functorch/vmap.py", line 39, in fn
    return f(*args, **kwargs)
  File "/home/bowbao/pytorch_dev/torch/_functorch/eager_transforms.py", line 1600, in wrapped
    func_outputs = func(*func_args, **func_kwargs)
  File "/home/bowbao/pytorch_dev/torch/fx/graph_module.py", line 662, in call_wrapped
    return self._wrapped_call(self, *args, **kwargs)
  File "/home/bowbao/pytorch_dev/torch/fx/graph_module.py", line 279, in __call__
    raise e.with_traceback(None)
RuntimeError: Cannot call sizes() on tensor with symbolic sizes/strides
```

### Versions

Main on e9786149ab71874fad478109de173af6996f7eec

cc @ezyang @soumith @msaroufim @wconstab @ngimel @bdhirsh @voznesenskym @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @desertfire