xref: /aosp_15_r20/external/executorch/backends/xnnpack/_passes/xnnpack_pass.py (revision 523fa7a60841cd1ecfb9cc4201f1ca8b03ed023a)
1# Copyright (c) Meta Platforms, Inc. and 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
7from executorch.exir.pass_base import ExportPass
8from torch.export import ExportedProgram
9
10
11class XNNPACKPass(ExportPass):
12    """
13    An abstract interface for XNNPACK backend passes.
14    """
15
16    def __init__(self, exported_program: ExportedProgram) -> None:
17        super().__init__()
18        self._exported_program = exported_program
19
20    @property
21    def exported_program(self) -> ExportedProgram:
22        return self._exported_program
23