Repository: pytorch
Issue: RuntimeError: Can't redefine method: forward on class: __torch__.torch.nn.quantized.modules.conv.Conv1d (of Python compilation unit at: 0x5571a223a770)
Labels: oncall: jit

## 🐛 Bug

scripting test failed in https://github.com/pytorch/pytorch/pull/52316 with error
```
Falsifying example: test_fn(<quantization.test_quantized_module.TestStaticQuantizedModule testMethod=test_conv1d_api>, batch_size=1, dilation=1, groups=1, in_channels_per_group=2, kernel=1, length=4, out_channels_per_group=2, pad=1, pad_mode='reflect', reference=True, stride=1, use_bias=False, use_channelwise=False, use_fused=False)
Traceback (most recent call last):
  File "/data/users/jerryzh/anaconda3/envs/py3/lib/python3.7/site-packages/torch/testing/_internal/common_quantized.py", line 151, in test_fn
    qfunction(*args, **kwargs)
  File "/data/users/jerryzh/pytorch/test/quantization/test_quantized_module.py", line 431, in test_conv1d_api
    Y_zero_point, use_bias, use_fused, use_channelwise, reference)
  File "/data/users/jerryzh/pytorch/test/quantization/test_quantized_module.py", line 340, in _test_conv_api_impl
    check_save_load=True)
  File "/data/users/jerryzh/anaconda3/envs/py3/lib/python3.7/site-packages/torch/testing/_internal/common_quantization.py", line 459, in checkScriptable
    scripted = torch.jit.script(orig_mod)
  File "/data/users/jerryzh/anaconda3/envs/py3/lib/python3.7/site-packages/torch/jit/_script.py", line 948, in script
    obj, torch.jit._recursive.infer_methods_to_compile
  File "/data/users/jerryzh/anaconda3/envs/py3/lib/python3.7/site-packages/torch/jit/_recursive.py", line 398, in create_script_module
    return create_script_module_impl(nn_module, concrete_type, stubs_fn)
  File "/data/users/jerryzh/anaconda3/envs/py3/lib/python3.7/site-packages/torch/jit/_recursive.py", line 459, in create_script_module_impl
    create_methods_and_properties_from_stubs(concrete_type, method_stubs, property_stubs)
  File "/data/users/jerryzh/anaconda3/envs/py3/lib/python3.7/site-packages/torch/jit/_recursive.py", line 341, in create_methods_and_properties_from_stubs
    concrete_type._create_methods_and_properties(property_defs, property_rcbs, method_defs, method_rcbs, method_defaults)
RuntimeError: Can't redefine method: forward on class: __torch__.torch.nn.quantized._reference.modules.conv.Conv1d (of Python compilation unit at: 0x5646ff93c1c0)

Falsifying example: test_fn(<quantization.test_quantized_module.TestStaticQuantizedModule testMethod=test_conv1d_api>, batch_size=1, dilation=1, groups=1, in_channels_per_group=2, kernel=1, length=4, out_channels_per_group=2, pad=0, pad_mode='zeros', reference=False, stride=1, use_bias=False, use_channelwise=False, use_fused=False)
Traceback (most recent call last):
  File "/data/users/jerryzh/anaconda3/envs/py3/lib/python3.7/site-packages/torch/testing/_internal/common_quantized.py", line 151, in test_fn
    qfunction(*args, **kwargs)
  File "/data/users/jerryzh/pytorch/test/quantization/test_quantized_module.py", line 431, in test_conv1d_api
    Y_zero_point, use_bias, use_fused, use_channelwise, reference)
  File "/data/users/jerryzh/pytorch/test/quantization/test_quantized_module.py", line 340, in _test_conv_api_impl
    check_save_load=True)
  File "/data/users/jerryzh/anaconda3/envs/py3/lib/python3.7/site-packages/torch/testing/_internal/common_quantization.py", line 459, in checkScriptable
    scripted = torch.jit.script(orig_mod)
  File "/data/users/jerryzh/anaconda3/envs/py3/lib/python3.7/site-packages/torch/jit/_script.py", line 948, in script
    obj, torch.jit._recursive.infer_methods_to_compile
  File "/data/users/jerryzh/anaconda3/envs/py3/lib/python3.7/site-packages/torch/jit/_recursive.py", line 398, in create_script_module
    return create_script_module_impl(nn_module, concrete_type, stubs_fn)
  File "/data/users/jerryzh/anaconda3/envs/py3/lib/python3.7/site-packages/torch/jit/_recursive.py", line 459, in create_script_module_impl
    create_methods_and_properties_from_stubs(concrete_type, method_stubs, property_stubs)
  File "/data/users/jerryzh/anaconda3/envs/py3/lib/python3.7/site-packages/torch/jit/_recursive.py", line 341, in create_methods_and_properties_from_stubs
    concrete_type._create_methods_and_properties(property_defs, property_rcbs, method_defs, method_rcbs, method_defaults)
RuntimeError: Can't redefine method: forward on class: __torch__.torch.nn.quantized.modules.conv.Conv1d (of Python compilation unit at: 0x5646ff93c1c0)

```

## To Reproduce

```
ghstack checkout https://github.com/pytorch/pytorch/pull/52316
python setup develop
python test/test_quantization.py TestStaticQuantizedModule.test_conv1d_api
```

## Expected behavior

Test should pass

cc @gmagogsfm