Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TorchFX PTQ backend #2764

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

daniil-lyakhov
Copy link
Collaborator

@daniil-lyakhov daniil-lyakhov commented Jun 26, 2024

Changes

  • Torch FX experimental PTQ backed is presented (MinMax, FBC)
  • Torch metatypes are updated with new namespace: ATEN
  • Some Torch metatypes are updated by new operations names

Reason for changes

To begin the Torch FX backend development

Related tickets

141640

Tests

  • Resnet18 imagnette sanity test
  • precommit github action for the torchFX backend

@github-actions github-actions bot added NNCF PT Pull requests that updates NNCF PyTorch NNCF Common Pull request that updates NNCF Common experimental NNCF PTQ Pull requests that updates NNCF PTQ labels Jun 26, 2024
@daniil-lyakhov daniil-lyakhov force-pushed the dl/torch_fx_quantization_init branch 2 times, most recently from fbd0fd5 to cea1693 Compare June 26, 2024 09:31
@daniil-lyakhov daniil-lyakhov changed the title Torch FQ PTQ backend initialization TorchFX PTQ backend initialization Jun 26, 2024
@daniil-lyakhov daniil-lyakhov force-pushed the dl/torch_fx_quantization_init branch 4 times, most recently from 3fb62df to c818a93 Compare June 26, 2024 15:50
@daniil-lyakhov daniil-lyakhov marked this pull request as ready for review June 26, 2024 15:57
@daniil-lyakhov daniil-lyakhov requested a review from a team as a code owner June 26, 2024 15:57
@alexsu52 alexsu52 changed the title TorchFX PTQ backend initialization TorchFX PTQ backend Jun 27, 2024
Copy link
Contributor

@alexsu52 alexsu52 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is curious that the developer does not quantize any operations in the torch.fx.GraphModule, but at the same time does not report errors that the torch backend does not support Torch FX.

Taking account that torch.fx is a part of torch and requires specific processing, I would like to make the following proposal:

  1. I agree to introduce TORCH_FX = "TorchFX" backend to simplify the factory code, but to simplify this PR you can skip adding support in nncf.quantize(). If you are going to do it you must warn the user that experimental code will be used.
  2. Make torch_fx as part of torch module. I mean nncf/experimental/torch_fx/ -> nncf/experimental/torch/fx/
  3. I suggest to use Torch GAs for TorchFX because requirements are the same and the backend is a part of Torch. In the future we may separate them, but only if we have problems with test completion times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experimental NNCF Common Pull request that updates NNCF Common NNCF PT Pull requests that updates NNCF PyTorch NNCF PTQ Pull requests that updates NNCF PTQ
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants