xref: /aosp_15_r20/external/executorch/exir/delegate.pyi (revision 523fa7a60841cd1ecfb9cc4201f1ca8b03ed023a)
1*523fa7a6SAndroid Build Coastguard Worker# Copyright (c) Meta Platforms, Inc. and affiliates.
2*523fa7a6SAndroid Build Coastguard Worker# All rights reserved.
3*523fa7a6SAndroid Build Coastguard Worker#
4*523fa7a6SAndroid Build Coastguard Worker# This source code is licensed under the BSD-style license found in the
5*523fa7a6SAndroid Build Coastguard Worker# LICENSE file in the root directory of this source tree.
6*523fa7a6SAndroid Build Coastguard Worker
7*523fa7a6SAndroid Build Coastguard Worker# TODO: delete this when pytorch pin advances
8*523fa7a6SAndroid Build Coastguard Worker
9*523fa7a6SAndroid Build Coastguard Workerfrom typing import Any
10*523fa7a6SAndroid Build Coastguard Worker
11*523fa7a6SAndroid Build Coastguard Workerimport torch
12*523fa7a6SAndroid Build Coastguard Workerfrom torch._ops import HigherOrderOperator
13*523fa7a6SAndroid Build Coastguard Worker
14*523fa7a6SAndroid Build Coastguard Workerexecutorch_call_delegate: HigherOrderOperator
15*523fa7a6SAndroid Build Coastguard Worker
16*523fa7a6SAndroid Build Coastguard Workerdef is_lowered_module(obj: Any) -> bool: ...
17*523fa7a6SAndroid Build Coastguard Workerdef get_lowered_module_name(
18*523fa7a6SAndroid Build Coastguard Worker    root: torch.nn.Module,
19*523fa7a6SAndroid Build Coastguard Worker    # pyre-ignore: Undefined or invalid type [11]: Annotation `LoweredBackendModule` is not defined as a type.
20*523fa7a6SAndroid Build Coastguard Worker    lowered_module: LOWERED_BACKEND_MODULE_TYPE,  # noqa
21*523fa7a6SAndroid Build Coastguard Worker) -> str: ...
22