pytorch / pytorch/vision

TorchVision support for pre-trained, quantised, ResNet50 using QNNpack backend

Open
#3,362 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement module: models.quantization
Dominant language
Python
Stars
17.9k
Forks
7.3k
Avg merge
1d 15h
Merged PRs (30d)
13

Description

🚀 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the quantised ResNet50 entry in torchvision.models and review how the existing FBGEMM backend is wired. Check the QNNpack backend requirements and existing quantised-model tests; done means a pre-trained quantised ResNet50 can run with QNNpack on AArch64 without regressing the existing backend.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
computer-vision, machine-learning, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.