About torch.qint32 support

Why the upper_bound of qrange_len is set to 2**31 when dtype is torch.qint32?

This looks like mismatch with the following code:

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.