diff --git a/backends/nxp/backend/edge_program_converter.py b/backends/nxp/backend/edge_program_converter.py index fdfa4a31bc6..9b0d4b296ad 100644 --- a/backends/nxp/backend/edge_program_converter.py +++ b/backends/nxp/backend/edge_program_converter.py @@ -56,7 +56,7 @@ class EdgeProgramToIRConverter: """ _default_conversion_config = ConversionConfig() - _default_target_spec = NeutronTargetSpec("imxrt700", "SDK_25_09") + _default_target_spec = NeutronTargetSpec("imxrt700", "SDK_25_12") _default_delegation_options = CustomDelegationOptions() def convert_program( diff --git a/backends/nxp/backend/neutron_converter_manager.py b/backends/nxp/backend/neutron_converter_manager.py index 881ad981146..a72e1195e04 100644 --- a/backends/nxp/backend/neutron_converter_manager.py +++ b/backends/nxp/backend/neutron_converter_manager.py @@ -28,7 +28,7 @@ class NeutronConverterManager: def __init__( self, - neutron_converter_flavor: str = "SDK_25_09", + neutron_converter_flavor: str = "SDK_25_12", ): neutron_converter_modules = [ diff --git a/backends/nxp/nxp_backend.py b/backends/nxp/nxp_backend.py index 4419f05aa99..5d34e94f2b1 100644 --- a/backends/nxp/nxp_backend.py +++ b/backends/nxp/nxp_backend.py @@ -67,7 +67,7 @@ def neutron_compile_spec( Args: config: Neutron accelerator configuration, e.g. "imxrt700" neutron_converter_flavor: Flavor of the neutron-converter module to use. Neutron-converter module named " - "'neutron_converter_SDK_25_09' has flavor 'SDK_25_09'. + "'neutron_converter_SDK_25_12' has flavor 'SDK_25_12'. extra_flags: Extra flags for the Neutron compiler operators_not_to_delegate: List of operators that should not be delegated use_neutron_for_format_conversion: If True, the EdgeProgramToIRConverter will insert `Transpose` ops to diff --git a/backends/nxp/requirements-tests-eiq.txt b/backends/nxp/requirements-tests-eiq.txt index 1fccf010e86..2bd97480ab6 100644 --- a/backends/nxp/requirements-tests-eiq.txt +++ b/backends/nxp/requirements-tests-eiq.txt @@ -1,2 +1,2 @@ --index-url https://eiq.nxp.com/repository -neutron_converter_SDK_25_09 +neutron_converter_SDK_25_12 diff --git a/backends/nxp/tests/executorch_pipeline.py b/backends/nxp/tests/executorch_pipeline.py index 61af7b5c67f..59ac74e2ce4 100644 --- a/backends/nxp/tests/executorch_pipeline.py +++ b/backends/nxp/tests/executorch_pipeline.py @@ -38,7 +38,7 @@ from torch.export import export from torchao.quantization.pt2e.quantizer import Quantizer -neutron_converter_flavor = "SDK_25_09" +neutron_converter_flavor = "SDK_25_12" neutron_target_spec = NeutronTargetSpec( target="imxrt700", neutron_converter_flavor=neutron_converter_flavor ) diff --git a/backends/nxp/tests/ir/converter/node_converter/test_cat_converter.py b/backends/nxp/tests/ir/converter/node_converter/test_cat_converter.py index e3ee2fff90b..10626a3fe6d 100644 --- a/backends/nxp/tests/ir/converter/node_converter/test_cat_converter.py +++ b/backends/nxp/tests/ir/converter/node_converter/test_cat_converter.py @@ -363,7 +363,7 @@ def test_cat__same_shapes_converter_padding_last_dimension(use_qat): CatModule(2), [input_shape, input_shape], target=target, - neutron_converter_flavor="SDK_25_09", + neutron_converter_flavor="SDK_25_12", custom_delegation_options=CustomDelegationOptions(), use_qat=use_qat, ).exported_program() @@ -385,7 +385,7 @@ def test_cat__same_shapes__channels_first__padding_channels(use_qat): CatConvModule(1), [input_shape, input_shape], target=target, - neutron_converter_flavor="SDK_25_09", + neutron_converter_flavor="SDK_25_12", custom_delegation_options=CustomDelegationOptions(), use_qat=use_qat, ).exported_program() diff --git a/backends/nxp/tests/test_edge_passes.py b/backends/nxp/tests/test_edge_passes.py index d93b1ae69ff..83727bdd833 100644 --- a/backends/nxp/tests/test_edge_passes.py +++ b/backends/nxp/tests/test_edge_passes.py @@ -319,7 +319,7 @@ def test_remove_additional_quantize_dequantize_nodes_pass(self): edge_program_manager = edge_program_manager.transform(NeutronEdgePassManager()) - compile_spec = generate_neutron_compile_spec(target, "SDK_25_09") + compile_spec = generate_neutron_compile_spec(target, "SDK_25_12") partitioner = NeutronPartitioner( compile_spec, neutron_target_spec, custom_delegation_options ) diff --git a/backends/nxp/tests/test_neutron_backend_executor.py b/backends/nxp/tests/test_neutron_backend_executor.py index ac87a569bb1..c77368b55a2 100644 --- a/backends/nxp/tests/test_neutron_backend_executor.py +++ b/backends/nxp/tests/test_neutron_backend_executor.py @@ -1,4 +1,4 @@ -# Copyright 2024 NXP +# Copyright 2024-2025 NXP # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. @@ -165,7 +165,7 @@ def test_delegating_format_related_transpose_operators__supported_case(mocker): # Make sure the output channels (channels for the trailing Transpose), and the last input dimension (channels for # the leading Transpose) are multiples of `num_macs``. - num_macs = NeutronTargetSpec("imxrt700", "SDK_25_09").get_num_macs() + num_macs = NeutronTargetSpec("imxrt700", "SDK_25_12").get_num_macs() model = Conv2dModule( in_channels=num_macs, out_channels=num_macs, padding=1, stride=1 ) @@ -222,7 +222,7 @@ def test_delegating_format_related_transpose_operators__supported_case(mocker): def test_delegating_format_related_transpose_operators__supported_output__unsupported_input( mocker, ): - num_macs = NeutronTargetSpec("imxrt700", "SDK_25_09").get_num_macs() + num_macs = NeutronTargetSpec("imxrt700", "SDK_25_12").get_num_macs() model = Conv2dModule( in_channels=num_macs, out_channels=num_macs, # The output `Transpose` will be supported. @@ -278,7 +278,7 @@ def test_delegating_format_related_transpose_operators__supported_output__unsupp def test_delegating_format_related_transpose_operators__supported_input__unsupported_output( mocker, ): - num_macs = NeutronTargetSpec("imxrt700", "SDK_25_09").get_num_macs() + num_macs = NeutronTargetSpec("imxrt700", "SDK_25_12").get_num_macs() model = Conv2dModule( in_channels=num_macs, out_channels=3, # The output `Transpose` will NOT be supported. diff --git a/backends/nxp/tests/test_split_group_convolution.py b/backends/nxp/tests/test_split_group_convolution.py index e8d807963ee..775c43d1fae 100644 --- a/backends/nxp/tests/test_split_group_convolution.py +++ b/backends/nxp/tests/test_split_group_convolution.py @@ -56,7 +56,7 @@ def _quantize_and_lower_module( edge_compile_config=edge_compile_config, ) - compile_spec = generate_neutron_compile_spec(target, "SDK_25_09") + compile_spec = generate_neutron_compile_spec(target, "SDK_25_12") partitioner = NeutronPartitioner(compile_spec, neutron_target_spec) return edge_program_manager.to_backend(partitioner) diff --git a/docs/source/backends/nxp/nxp-overview.md b/docs/source/backends/nxp/nxp-overview.md index 973bffe6f19..34f8efc3036 100644 --- a/docs/source/backends/nxp/nxp-overview.md +++ b/docs/source/backends/nxp/nxp-overview.md @@ -23,11 +23,11 @@ Among currently supported machine learning models are: ## Development Requirements - [MCUXpresso IDE](https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-integrated-development-environment-ide:MCUXpresso-IDE) or [MCUXpresso Visual Studio Code extension](https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-for-visual-studio-code:MCUXPRESSO-VSC) -- [MCUXpresso SDK 25.06](https://mcuxpresso.nxp.com/mcuxsdk/25.06.00/html/index.html) -- eIQ Neutron Converter for MCUXPresso SDK 25.06, what you can download from eIQ PyPI: +- [MCUXpresso SDK 25.12](https://mcuxpresso.nxp.com/mcuxsdk/25.12.00/html/index.html) +- eIQ Neutron Converter for MCUXPresso SDK 25.12, what you can download from eIQ PyPI: ```commandline -$ pip install --index-url https://eiq.nxp.com/repository neutron_converter_SDK_25_06 +$ pip install --index-url https://eiq.nxp.com/repository neutron_converter_SDK_25_12 ``` Instead of manually installing requirements, except MCUXpresso IDE and SDK, you can use the setup script: diff --git a/docs/source/backends/nxp/nxp-partitioner.rst b/docs/source/backends/nxp/nxp-partitioner.rst index d6ef1c216fd..74f855c25da 100644 --- a/docs/source/backends/nxp/nxp-partitioner.rst +++ b/docs/source/backends/nxp/nxp-partitioner.rst @@ -16,7 +16,7 @@ To generate the Compile Spec for Neutron backend, you can use the `generate_neut Following fields can be set: * `config` - NXP platform defining the Neutron NPU configuration, e.g. "imxrt700". -* `neutron_converter_flavor` - Flavor of the neutron-converter module to use. Neutron-converter module named neutron_converter_SDK_25_06' has flavor 'SDK_25_06'. You shall set the flavour to the MCUXpresso SDK version you will use. +* `neutron_converter_flavor` - Flavor of the neutron-converter module to use. Neutron-converter module named neutron_converter_SDK_25_12' has flavor 'SDK_25_12'. You shall set the flavour to the MCUXpresso SDK version you will use. * `extra_flags` - Extra flags for the Neutron compiler. * `operators_not_to_delegate` - List of operators that will not be delegated. diff --git a/docs/source/backends/nxp/nxp-quantization.md b/docs/source/backends/nxp/nxp-quantization.md index da7bc94f821..a4516856ff6 100644 --- a/docs/source/backends/nxp/nxp-quantization.md +++ b/docs/source/backends/nxp/nxp-quantization.md @@ -64,7 +64,7 @@ from torchao.quantization.pt2e.quantize_pt2e import convert_pt2e, prepare_pt2e model = models.mobilenetv2.mobilenet_v2(weights=MobileNet_V2_Weights.DEFAULT).eval() sample_inputs = (torch.randn(1, 3, 224, 224), ) -target_spec = NeutronTargetSpec(target="imxrt700", converter_flavor="SDK_25_09") +target_spec = NeutronTargetSpec(target="imxrt700", converter_flavor="SDK_25_12") quantizer = NeutronQuantizer(neutron_target_spec) # (1) training_ep = torch.export.export(model, sample_inputs).module() # (2) @@ -78,7 +78,7 @@ quantized_model = convert_pt2e(prepared_model) # (5) compile_spec = generate_neutron_compile_spec( "imxrt700", operators_not_to_delegate=None, - neutron_converter_flavor="SDK_25_06", + neutron_converter_flavor="SDK_25_12", ) et_program = to_edge_transform_and_lower( # (6) @@ -95,7 +95,7 @@ from executorch.backends.nxp.quantizer.utils import calibrate_and_quantize ... -target_spec = NeutronTargetSpec(target="imxrt700", converter_flavor="SDK_25_09") +target_spec = NeutronTargetSpec(target="imxrt700", converter_flavor="SDK_25_12") quantized_graph_module = calibrate_and_quantize( aten_model, calibration_inputs, diff --git a/examples/nxp/README.md b/examples/nxp/README.md index 2030afce3cd..7bfa752b610 100644 --- a/examples/nxp/README.md +++ b/examples/nxp/README.md @@ -36,11 +36,11 @@ The steps are expected to be executed from the `executorch` root folder. 1. Run the `aot_neutron_compile.py` example with the `cifar10` model ```commandline $ python -m examples.nxp.aot_neutron_compile --quantize \ - --delegate --neutron_converter_flavor SDK_25_09 -m cifar10 + --delegate --neutron_converter_flavor SDK_25_12 -m cifar10 ``` 2. It will generate you `cifar10_nxp_delegate.pte` file which can be used with the MCUXpresso SDK `cifarnet_example` project, presented [here](https://mcuxpresso.nxp.com/mcuxsdk/latest/html/middleware/eiq/executorch/docs/nxp/topics/example_applications.html#how-to-build-and-run-executorch-cifarnet-example). This project will guide you through the process of deploying your PTE model to the device. To get the MCUXpresso SDK follow this [guide](https://mcuxpresso.nxp.com/mcuxsdk/latest/html/middleware/eiq/executorch/docs/nxp/topics/getting_mcuxpresso.html), -use the MCUXpresso SDK v25.09.00. +use the MCUXpresso SDK v25.12.00. diff --git a/examples/nxp/aot_neutron_compile.py b/examples/nxp/aot_neutron_compile.py index 175dc9d8d70..45f09d90bb0 100644 --- a/examples/nxp/aot_neutron_compile.py +++ b/examples/nxp/aot_neutron_compile.py @@ -137,9 +137,9 @@ def get_model_and_inputs_from_name(model_name: str): "-c", "--neutron_converter_flavor", required=False, - default="SDK_25_09", + default="SDK_25_12", help="Flavor of installed neutron-converter module. Neutron-converter module named " - "'neutron_converter_SDK_25_09' has flavor 'SDK_25_09'.", + "'neutron_converter_SDK_25_12' has flavor 'SDK_25_12'.", ) parser.add_argument( "-q", diff --git a/examples/nxp/run_aot_example.sh b/examples/nxp/run_aot_example.sh index 8f28c4f8143..11f3b10b4d7 100755 --- a/examples/nxp/run_aot_example.sh +++ b/examples/nxp/run_aot_example.sh @@ -13,6 +13,6 @@ cd $EXECUTORCH_DIR # Run the AoT example python -m examples.nxp.aot_neutron_compile --quantize \ - --delegate --neutron_converter_flavor SDK_25_09 -m ${MODEL} + --delegate --neutron_converter_flavor SDK_25_12 -m ${MODEL} # verify file exists test -f ${MODEL}_nxp_delegate.pte diff --git a/examples/nxp/setup.sh b/examples/nxp/setup.sh index b1ded16e1cf..f0445e68028 100755 --- a/examples/nxp/setup.sh +++ b/examples/nxp/setup.sh @@ -7,7 +7,7 @@ set -u # Install neutron-converter -pip install --index-url https://eiq.nxp.com/repository neutron_converter_SDK_25_09 +pip install --index-url https://eiq.nxp.com/repository neutron_converter_SDK_25_12 # Get the directory of the current script SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"