[Quant][core][improvement] Enabled slicing on per-channel quantized tensors (support is limited to the a contiguous sliced tensor); added correpsonding test case (#71269)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/71269
Support for slicing of per-channel quantized tensors was added; however, this feature is only available to contiguous sliced tensors, e.g., qt[1, :], but not qt[:, 0] for a 2x2 qt. The latter case would trigger an exception.
Test Plan:
In pytorch main dir, execute
```
python test/test_quantization.py TestQuantizedTensor.test_qtensor_channel_float_assignment
```
to execute the corresponding test case.
In pytorch main dir, execute
```
python test/test_quantization.py TestQuantizedTensor.test_qtensor_channel_float_assignment
```
to execute the corresponding test case.
Differential Revision:
D33943512
D33943512
Reviewed By: albanD
Pulled By: dzdang
fbshipit-source-id: 602ec11718290df995260183b2618921a39f3c3f
(cherry picked from commit 04a4ad433d1218d15e67fbd0ad7c684e3e9b1efc)