About torch.qint32 support

Why the upper_bound of qrange_len is set to 2**31 when dtype is torch.qint32?
https://github.com/pytorch/pytorch/blob/2628901033e7df5b87a9b7137ddffb450d4a7c42/torch/ao/quantization/utils.py#L356

This looks like mismatch with the following code:
https://github.com/pytorch/pytorch/blob/2628901033e7df5b87a9b7137ddffb450d4a7c42/torch/ao/quantization/utils.py#L374

Hi PuNeal,

Thanks for flagging this! this looks like a typo and it should be 2**32.
I’ll open a PR to fix this or if you want to contribute please feel free.

Hi Jesse,
Thanks for your reply, but I don’t know how to contribute. Can you send me the commit link after you fix this bug? Thank you.

Sure, no worries. I’ve opened a PR for this fix here: [quant][bug fix] Fix qrange_len in `torch.ao.quantization.utils.py` by jcaip · Pull Request #95297 · pytorch/pytorch · GitHub that should be merged soon.