• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2024 Arm Limited and/or its affiliates.
2# All rights reserved.
3#
4# This source code is licensed under the BSD-style license found in the
5# LICENSE file in the root directory of this source tree.
6
7# pyre-unsafe
8
9from executorch.exir.dialects._ops import ops as exir_ops
10from executorch.exir.pass_base import ExportPass
11
12
13class RemoveClonePass(ExportPass):
14
15    def call_operator(self, op, args, kwargs, meta):
16        if op != exir_ops.edge.aten.clone.default:
17            return super().call_operator(op, args, kwargs, meta)
18
19        assert len(args) == 1
20        return args[0]
21