diff --git a/backends/arm/_passes/scalars_to_attribute_pass.py b/backends/arm/_passes/scalars_to_attribute_pass.py index ae653afac8d..89468bff1ff 100644 --- a/backends/arm/_passes/scalars_to_attribute_pass.py +++ b/backends/arm/_passes/scalars_to_attribute_pass.py @@ -12,8 +12,8 @@ from executorch.backends.arm._passes.arm_pass_utils import get_first_fake_tensor from executorch.exir.pass_base import ExportPass, PassResult -from torch.ao.quantization.fx.utils import get_new_attr_name_with_prefix from torch.fx import GraphModule, Node +from torchao.quantization.pt2e.utils import get_new_attr_name_with_prefix class ScalarsToAttributePass(ExportPass): diff --git a/backends/qualcomm/_passes/lift_constant_scalar_operands.py b/backends/qualcomm/_passes/lift_constant_scalar_operands.py index 0e65396dbcf..2e5405fcb7b 100644 --- a/backends/qualcomm/_passes/lift_constant_scalar_operands.py +++ b/backends/qualcomm/_passes/lift_constant_scalar_operands.py @@ -14,8 +14,8 @@ from executorch.exir.pass_base import ExportPass, PassResult from executorch.exir.passes import dead_code_elimination_pass from torch import fx -from torch.ao.quantization.fx.utils import get_new_attr_name_with_prefix from torch.ops import aten as aten +from torchao.quantization.pt2e.utils import get_new_attr_name_with_prefix @dataclass(frozen=True) diff --git a/export/export.py b/export/export.py index 7dd6b239d0a..f21fe33a75e 100644 --- a/export/export.py +++ b/export/export.py @@ -15,11 +15,12 @@ from executorch.runtime import Runtime, Verification from tabulate import tabulate from torch import nn -from torch.ao.quantization import allow_exported_model_train_eval -from torch.ao.quantization.quantizer.composable_quantizer import ComposableQuantizer from torch.export import ExportedProgram from torchao.quantization import quantize_ +from torchao.quantization.pt2e import allow_exported_model_train_eval from torchao.quantization.pt2e.quantize_pt2e import convert_pt2e, prepare_pt2e + +from torchao.quantization.pt2e.quantizer import ComposableQuantizer from torchao.utils import unwrap_tensor_subclass from .recipe import ExportRecipe