Skip to content

Commit db2fd03

Browse files
Arm backend: Refactor SliceCopySupport
Refactor SliceCopySupport to not use TosaArg, but to use torch.fx.Node instead. Signed-off-by: Oscar Andersson <[email protected]> Change-Id: I1d67161d017a5e70348fa1aeaa0857041274bc6d
1 parent b69d87a commit db2fd03

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

backends/arm/operator_support/slice_copy_support.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
SupportedTOSAOperatorCheck,
1313
)
1414
from executorch.backends.arm.tosa_specification import TosaSpecification
15-
from executorch.backends.arm.tosa_utils import getNodeArgs
1615
from executorch.exir.dialects._ops import ops as exir_ops
1716

1817
logger = logging.getLogger(__name__)
@@ -33,8 +32,8 @@ def is_node_tosa_supported(self, node: fx.Node, tosa_spec: TosaSpecification) ->
3332
if tosa_spec not in self.tosa_specs:
3433
return False
3534

36-
inputs = getNodeArgs(node)
37-
if len(inputs) == 5 and (step := inputs[4].number) != 1:
35+
args = node.args
36+
if len(args) == 5 and (step := args[4]) != 1:
3837
logging.warning(f"{node.target} with step size of {step} not supported.")
3938
return False
4039
return True

0 commit comments

Comments
 (0)