TorchVision support for pre-trained, quantised, ResNet50 using QNNpack backend
See original GitHub issue🚀 Feature
Addition of pre-trained, quantised ResNet50 model to torchvision.models
with support for QNNpack backend.
Motivation
Quantised models have been shown to deliver greater performance than their fp32 equivalents without sacrificing accuracy. The quantised ResNet50 model currently available in TorchVision supports the FBGEMM backend, but does not provide support for QNNpack. On AArch64, only the QNNpack backend is currently supported, so expanding the functionality of the ResNet50 model would allow its use one AArch64 platforms. Expanding the capabilities of the quantised models available to TorchVision users would provide functionality equivalent to what is currently available in other frameworks.
Pitch
Quantised, pre-trained, ResNet50 models are available for use on with TensorFlow (https://github.com/IntelAI/models/blob/master/benchmarks/image_recognition/tensorflow/resnet50v1_5/README.md#int8-inference-instructions) and typically deliver improved performance over their fp32 equivalents.
Are there any plans to expand the supported backends for the quantised ResNet50 model to TorchVision to cover QNNpack?
Alternatives
Where the workload or benchmark requires ResNet50, the alternative is to make your own quantised model using the qnnpack backend.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Thanks @oke-aditya, I didn’t find any details of QNNpack support for ResNet50 in the plans, but have asked in-thread.
I’ve updated my ‘Feature Request’ above in light of our discussion, so it’s more specific to my use-case (QNNpack backend, on AArch64).
Thanks for the request and sorry for the delay in replying.
I might not remember correctly anymore, but IIRC we provided
fbgemm
backends for ResNet becausefbgemm
was better suited for server inference, and ResNet50 was normally too big for running on embedded devices (on which qnnpack was better).@nSircombe are you planning on running ResNet50 on embedded devices, or is it that fbgemm doesn’t work in your system?