Skip to content

Commit fad25ad

Browse files
authored
Migrate some missed pt2e pieces (#11500)
1 parent dffbd42 commit fad25ad

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

backends/arm/_passes/scalars_to_attribute_pass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
from executorch.backends.arm._passes.arm_pass_utils import get_first_fake_tensor
1313

1414
from executorch.exir.pass_base import ExportPass, PassResult
15-
from torch.ao.quantization.fx.utils import get_new_attr_name_with_prefix
1615
from torch.fx import GraphModule, Node
16+
from torchao.quantization.pt2e.utils import get_new_attr_name_with_prefix
1717

1818

1919
class ScalarsToAttributePass(ExportPass):

backends/qualcomm/_passes/lift_constant_scalar_operands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
from executorch.exir.pass_base import ExportPass, PassResult
1515
from executorch.exir.passes import dead_code_elimination_pass
1616
from torch import fx
17-
from torch.ao.quantization.fx.utils import get_new_attr_name_with_prefix
1817
from torch.ops import aten as aten
18+
from torchao.quantization.pt2e.utils import get_new_attr_name_with_prefix
1919

2020

2121
@dataclass(frozen=True)

export/export.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@
1515
from executorch.runtime import Runtime, Verification
1616
from tabulate import tabulate
1717
from torch import nn
18-
from torch.ao.quantization import allow_exported_model_train_eval
19-
from torch.ao.quantization.quantizer.composable_quantizer import ComposableQuantizer
2018
from torch.export import ExportedProgram
2119
from torchao.quantization import quantize_
20+
from torchao.quantization.pt2e import allow_exported_model_train_eval
2221
from torchao.quantization.pt2e.quantize_pt2e import convert_pt2e, prepare_pt2e
22+
23+
from torchao.quantization.pt2e.quantizer import ComposableQuantizer
2324
from torchao.utils import unwrap_tensor_subclass
2425

2526
from .recipe import ExportRecipe

0 commit comments

Comments
 (0)