Skip to content

Commit d04ab5d

Browse files
NXP backend: Replace deprecated torch.ao import. (pytorch#17554)
### Summary Recent update removed the `move_exported_model_to_eval` and `move_exported_model_to_train` from `torch.ao.quantization`. The functions are now accessed from `torchao.quantization.pt2e`. ### Test plan Tested by `run_aot_example.sh`, which is run by the standard `backends/nxp/run_unittests.sh`. cc @robert-kalmar @JakeStevens @digantdesai
1 parent aa967b0 commit d04ab5d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎examples/nxp/aot_neutron_compile.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@
3939
to_edge_transform_and_lower,
4040
)
4141
from executorch.extension.export_util import save_pte_program
42-
from torch.ao.quantization import (
42+
from torch.export import export
43+
from torchao.quantization.pt2e import (
4344
move_exported_model_to_eval,
4445
move_exported_model_to_train,
4546
)
46-
from torch.export import export
4747
from torchao.quantization.pt2e.quantize_pt2e import convert_pt2e, prepare_qat_pt2e
4848

4949
from .experimental.cifar_net.cifar_net import (

0 commit comments

Comments
 (0)