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

Add decorator for custom op and inductor decomp registration #434

Merged
merged 1 commit into from
Jul 2, 2024

Commits on Jul 2, 2024

  1. Add decorator for custom op and inductor decomp registration

    Summary:
    This PR adds a decorator to register custom op and also an inductor dcomposition.
    
    The goal is for torch.export path to be able to see high level ops like quantize_affine instead of breaking down the op, this is because some backends like xnnpack wants to work with these higher level ops.
    
    This is a redo for pytorch#408, difference is we can preserve the enums on the python side in this PR
    
    Test Plan:
    regression tests:
    python test/quantization/test_quant_api.py
    python test/integration/test_integration.py
    
    also need to check performance with python tutorials/quantize_vit/run_vit_b_quant.py
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Tags:
    jerryzh168 committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    320b846 View commit details
    Browse the repository at this point in the history