Skip to content

Commit 345977a

Browse files
Arm backend: Move import in DecomposePermuteForU55Pass (pytorch#19331)
Importing on top-level causes a dependency cycle Signed-off-by: Adrian Lundell <adrian.lundell@arm.com>
1 parent 3a381b3 commit 345977a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

backends/arm/_passes/decompose_permute_for_u55_pass.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from executorch.backends.arm._passes.arm_pass import ArmPass
1515
from executorch.backends.arm._passes.rewrite_slice import RewriteSlicePass
1616
from executorch.backends.arm.arm_vela import vela_compile
17-
from executorch.backends.arm.ethosu.compile_spec import EthosUCompileSpec
1817
from executorch.backends.arm.tosa.mapping import map_dtype
1918
from executorch.backends.arm.tosa.specification import get_context_spec
2019
from executorch.exir.dialects._ops import ops as exir_ops
@@ -112,6 +111,9 @@ def _violates_exact_constraint(
112111
permutation and dtype to check wheter it is supported.
113112
"""
114113

114+
# Lazy import to avoid circular dependency
115+
from executorch.backends.arm.ethosu.compile_spec import EthosUCompileSpec
116+
115117
if dtype not in (torch.int8, torch.bool, torch.int16):
116118
return True
117119

0 commit comments

Comments
 (0)