88from executorch import exir
99from executorch .backends .nxp .neutron_partitioner import NeutronPartitioner
1010from executorch .backends .nxp .nxp_backend import generate_neutron_compile_spec
11-
12- # TODO (Robert Kalmar) Uncomment when NXP passes are ported to main
13- # from executorch.backends.nxp.pytorch_passes.nxp_pytorch_pass_manager import NXPPyTorchPassManager
1411from executorch .backends .nxp .quantizer .neutron_quantizer import NeutronQuantizer
1512from executorch .exir import (
1613 EdgeCompileConfig ,
@@ -27,7 +24,7 @@ def _quantize_model(model, calibration_inputs: list[tuple[torch.Tensor]]):
2724 quantizer = NeutronQuantizer ()
2825
2926 m = prepare_pt2e (model , quantizer )
30- for _i , data in enumerate ( calibration_inputs ) :
27+ for data in calibration_inputs :
3128 m (* data )
3229 m = convert_pt2e (m )
3330
@@ -48,14 +45,8 @@ def to_quantized_edge_program(
4845 model , example_input , strict = True
4946 )
5047
51- # TODO(Robert Kalmar) uncoment when NXP passes are ported to main
52- # Run pre-processing passes of the float32 aten dialect program.
53- # pass_manager = NXPPyTorchPassManager(exir_program_aten)
54- # pass_manager.run() # All passes by default.
55-
56- exir_program_aten_module = exir_program_aten .module ()
5748 exir_program_aten__module_quant = _quantize_model (
58- exir_program_aten_module , calibration_inputs
49+ exir_program_aten . module () , calibration_inputs
5950 )
6051
6152 compile_spec = generate_neutron_compile_spec (
0 commit comments