FX Graph Mode Quantization - Generate static quantization network
Labels: oncall: quantization, triaged, fx

### 🐛 Describe the bug

## Network code
e4 = self.elu(self.bn4(self.conv4(e3)[:, :, :-1, :].contiguous()))
e5 = self.elu(self.bn5(self.conv5(e4)[:, :, :-1, :].contiguous()))

## Network automatically generated by torch.fx
contiguous_3 = quantize_per_tensor_18.contiguous();  quantize_per_tensor_18 = None
bn4 = self.bn4(contiguous_3);  contiguous_3 = None
elu_3 = self.elu(bn4);  bn4 = None
conv5 = self.conv5(elu_3)
dequantize_22 = conv5.dequantize();  conv5 = None
getitem_4 = dequantize_22[(slice(None, None, None), slice(None, None, None), slice(None, -1, None), slice(None, None, None))];  dequantize_22 = None
_scale_9 = self._scale_9
_zero_point_9 = self._zero_point_9
quantize_per_tensor_23 = torch.quantize_per_tensor(getitem_4, _scale_9, _zero_point_9, torch.quint8);  getitem_4 = _scale_9 = _zero_point_9 = None
contiguous_4 = quantize_per_tensor_23.contiguous();  quantize_per_tensor_23 = None
bn5 = self.bn5(contiguous_4);  contiguous_4 = None
dequantize_25 = bn5.dequantize();  bn5 = None
elu_4 = self.elu(dequantize_25);  dequantize_25 = None

## report errors
Traceback (most recent call last):
  File "/mnt/raid/userspace/fanhaipeng/anaconda3/envs/torch13e/lib/python3.8/site-packages/torch/fx/graph_module.py", line 277, in __call__
    raise e
  File "/mnt/raid/userspace/fanhaipeng/anaconda3/envs/torch13e/lib/python3.8/site-packages/torch/fx/graph_module.py", line 267, in __call__
    return super(self.cls, obj).__call__(*args, **kwargs)  # type: ignore[misc]
  File "/mnt/raid/userspace/fanhaipeng/anaconda3/envs/torch13e/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
    return forward_call(*input, **kwargs)
  File "<eval_with_key>.7", line 54, in forward
  File "/mnt/raid/userspace/fanhaipeng/anaconda3/envs/torch13e/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
    return forward_call(*input, **kwargs)
  File "/mnt/raid/userspace/fanhaipeng/anaconda3/envs/torch13e/lib/python3.8/site-packages/torch/ao/nn/quantized/modules/activation.py", line 83, in forward
    return torch.ao.nn.quantized.functional.elu(
  File "/mnt/raid/userspace/fanhaipeng/anaconda3/envs/torch13e/lib/python3.8/site-packages/torch/ao/nn/quantized/functional.py", line 494, in elu
    raise ValueError("Input to 'quantized.elu' must be quantized!")
ValueError: Input to 'quantized.elu' must be quantized!


### Versions

Collecting environment information...
PyTorch version: 1.13.0.dev20220912+cu113
Is debug build: False
CUDA used to build PyTorch: 11.3
ROCM used to build PyTorch: N/A

OS: Ubuntu 16.04.6 LTS (x86_64)
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
Clang version: 3.8.0-2ubuntu4 (tags/RELEASE_380/final)
CMake version: Could not collect
Libc version: glibc-2.23

Python version: 3.8.13 (default, Mar 28 2022, 11:38:47)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-4.4.0-210-generic-x86_64-with-glibc2.17
Is CUDA available: True
CUDA runtime version: 7.5.17
GPU models and configuration:
GPU 0: TITAN Xp
GPU 1: TITAN Xp
GPU 2: TITAN Xp
GPU 3: TITAN Xp

Nvidia driver version: 455.23.05
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.5.1.10
/usr/lib/x86_64-linux-gnu/libcudnn.so.6.0.21
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.23.3
[pip3] torch==1.13.0.dev20220912+cu113
[pip3] torchaudio==0.13.0.dev20220912+cu113
[pip3] torchsummary==1.5.1
[pip3] torchvision==0.14.0.dev20220912+cu113
[conda] numpy                     1.23.3                   pypi_0    pypi
[conda] torch                     1.13.0.dev20220912+cu113          pypi_0    pypi
[conda] torchaudio                0.13.0.dev20220912+cu113          pypi_0    pypi
[conda] torchsummary              1.5.1                    pypi_0    pypi
[conda] torchvision               0.14.0.dev20220912+cu113          pypi_0    pypi


cc @jerryzh168 @jianyuh @raghuramank100 @jamesr66a @vkuzo @jgong5 @Xia-Weiwen @leslie-fang-intel @ezyang @SherlockNoMad @EikanWang @wenzhe-nrv @soumith