Repository: pytorch
Issue: torch.concat doesn't raise an error in a quantized model
Labels: oncall: quantization,low priority,triaged

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->
Reported by a user: "I created a quantized model with torch.concat and it runs without requantization of the output whereas I believe it raised an error previously (bc the recommended route is to use FloatFunctional.cat so we can add activation observer)
It runs fine so what's the issue:
without the requantization, the scale and zero point of the output appears to be copied using just the first input (without consideration of the second input). This leads to weird results if the input value ranges are different
when running qat, the output is the same as the input as we ignore running any fake_quant so the converted model will be different than the trained model
without an error (or warning) raised, I mistakenly forgot to consider what happens with concat and quantization.
This is not blocking as I should have used FloatFunctional instead but just wanted to check that torch.cat supporting quantized inputs was intentional and maybe suggest that some kind of error or warning gets raised if the torchscript model runs quantized inputs into concat op."

## To Reproduce

Steps to reproduce the behavior:

Example code attached below:

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

import torch
import torch.nn as nn
from torch.quantization import QuantStub, DeQuantStub
from torch.nn.quantized.modules import FloatFunctional



class Model(nn.Module):
    def __init__(self):
        super().__init__()
        self.qx = QuantStub()
        self.qy = QuantStub()
        
    def forward(self, x, y):
        xq = self.qx(x)
        yq = self.qy(y)
        out = torch.cat([xq, yq], dim=1)
        return out
        

input_x = torch.randn(1, 1)
input_y = torch.randn(1, 1) + 10

model = Model()
model.train()
torch.backends.quantized.engine = "qnnpack"
model.qconfig = torch.quantization.get_default_qat_qconfig('qnnpack')
torch.quantization.prepare_qat(model, inplace=True)
qat_output = model(input_x, input_y)
converted_model = torch.quantization.convert(model.eval())
output = converted_model(input_x, input_y)
traced_model = torch.jit.trace(converted_model, (input_x, input_y))
ops = torch.jit.export_opnames(traced_model)

print(converted_model)
print()
print(f"Inputs:\n  {input_x, input_y}")
print()
print(f"QAT output:\n  {qat_output}")
print()
print(f"Quant output:\n   {output}")
print()
print("\n".join(ops))

## Expected behavior


<!-- A clear and concise description of what you expected to happen. -->

Expect to raise error or warning

## Environment

Please copy and paste the output from our
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
(or fill out the checklist below manually).

You can get the script and run it with:
```
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
```

 - PyTorch Version (e.g., 1.0):
 - OS (e.g., Linux):
 - How you installed PyTorch (`conda`, `pip`, source):
 - Build command you used (if compiling from source):
 - Python version:
 - CUDA/cuDNN version:
 - GPU models and configuration:
 - Any other relevant information:

## Additional context

<!-- Add any other context about the problem here. -->


cc @jerryzh168 @jianyuh @raghuramank100 @jamesr66a @vkuzo @jgong5 @Xia-Weiwen @leslie-fang-intel @dzhulgakov