Skip to content

Commit 2084866

Browse files
NXP Neutron forward fix missing arg (#19158)
Internal sdk version needs to be bumped I think. To get around the failing CI for now I think we can just gate the flag like this. IIUC it shouldnt regress internal since this flag would be false then anyway.
1 parent 3a62fac commit 2084866

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

backends/nxp/backend/neutron_converter_manager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ def convert(
9292
)
9393
cctx.compilationOpts.fetchConstantsToSRAM = fetch_constants_to_sram
9494
cctx.compilationOpts.dumpKernelSelectionCode = self.dump_kernel_selection_code
95-
cctx.compilationOpts.useNewFlowNeutronC = use_new_flow_neutron_c
95+
if hasattr(cctx.compilationOpts, "useNewFlowNeutronC"):
96+
cctx.compilationOpts.useNewFlowNeutronC = use_new_flow_neutron_c
9697

9798
# Try to use multiprocessing for isolation, but fall back to direct execution
9899
# if the environment doesn't support it (e.g., in sandcastle/build environments)

backends/nxp/tests/test_neutron_converter_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import torch
99
from eiq_neutron_sdk.neutron_converter.neutron_converter import CompilationContext
10-
1110
from executorch import exir
1211
from executorch.backends.nxp.backend.edge_program_converter import (
1312
EdgeProgramToIRConverter,
@@ -72,4 +71,5 @@ def test_neutron_converter_with_experimental_mlir_flow(mocker):
7271

7372
compilation_context = process_spy.call_args.kwargs["args"][2]
7473
assert isinstance(compilation_context, CompilationContext)
75-
assert compilation_context.compilationOpts.useNewFlowNeutronC
74+
if hasattr(compilation_context.compilationOpts, "useNewFlowNeutronC"):
75+
assert compilation_context.compilationOpts.useNewFlowNeutronC

0 commit comments

Comments
 (0)