executorch icon indicating copy to clipboard operation
executorch copied to clipboard

Does executorch support qat quant for qualcomm qnn backend?

Open Novelfor opened this issue 11 months ago • 1 comments

I want to use qat method for my model, but i can only find ptq quantizer in executorch, are there some examples of how to implement Quantization Aware Training (QAT) for qnn backend?

Novelfor avatar Feb 29 '24 05:02 Novelfor

QAT is going through the same code path as PTQ. if you don't have some special handling for conv-bn, you could start with adding the configuration for QAT, like: https://github.com/pytorch/pytorch/blob/a0429c01ad665ffb2faa04a411913ecee9962566/torch/ao/quantization/quantizer/xnnpack_quantizer.py#L116

jerryzh168 avatar May 16 '24 18:05 jerryzh168