lijunzh:

https://github.com/pytorch/pytorch/pull/33743  give a nice touch on the sub-8-bit quantization. However, if I want to do some 1-bit quantization which quantizes the feature map and weight matrices into {-1, 1}. This may requires further changes in the qscheme . I am guessing that will require me add some PyTorch intrinsics in ATen? Or there is a better way to accomendate that need?


right, if it is {-1, 1} it is not probably not affine quantization, what would you quantize 0 into?
I think you’ll probably need to extend qscheme and implement a new quantizer(https://codebrowser.bddppq.com/pytorch/pytorch/aten/src/ATen/quantized/Quantizer.h.html 14) to support this.