[quant][core][improvement] Added earlier termination and improved error message for calling min and max ops on per channel quantized tensors.
Summary:
Fixes #42598
Max and min operators for quantized tensors only supports per tensor
quantized tensors. Previously, an exception is thrown further down the
stack of involved operator calls. This PR adds an earlier termination
with a clearer error message.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79036
Approved by: https://github.com/vkuzo