Skip to content

Quantization Lowering Support #4356

@WilliamZhang20

Description

@WilliamZhang20

In my file here, I train a model using Quantization-Aware-Training (QAT).

I then export MLIR at this file in TOSA. Note that inside that file, the attempt to export in TOSA fails as there are no TOSA ops, we still have torch.aten ops.

However, when running:

torch-mlir-opt qat_model_torch_dialect.mlir     --torch-unpack-quant-tensor     --convert-torch-to-tosa     --canonicalize     --symbol-dce     -o final_tosa
_model.mlir

I get:

<unknown>:0: error: unable to schedule pass 'UnpackQuantTensor' on a PassManager intended to run on 'builtin.module'!

Any reason for this?
I am also unsure how to use the newest TorchAO pt2e QAT with MLIR integration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions