77# pyre-strict
88from typing import Any , Dict , List , Optional , Sequence , Tuple
99
10+ from executorch .exir ._warnings import experimental
11+
12+ @experimental ("This API is experimental and subject to change without notice." )
1013class ExecuTorchModule :
14+ """ExecuTorchModule is a Python wrapper around a C++ ExecuTorch program.
15+
16+ .. warning::
17+
18+ This API is experimental and subject to change without notice.
19+ """
20+
1121 # pyre-ignore[2, 3]: "Any" in parameter and return type annotations.
1222 def __call__ (self , inputs : Any ) -> List [Any ]: ...
1323 # pyre-ignore[2, 3]: "Any" in parameter and return type annotations.
@@ -34,12 +44,26 @@ class ExecuTorchModule:
3444 self , path : str , debug_buffer_path : Optional [str ] = None
3545 ) -> None : ...
3646
37- class BundledModule : ...
47+ @experimental ("This API is experimental and subject to change without notice." )
48+ class BundledModule :
49+ """
50+ .. warning::
3851
52+ This API is experimental and subject to change without notice.
53+ """
54+
55+ ...
56+
57+ @experimental ("This API is experimental and subject to change without notice." )
3958def _load_for_executorch (
4059 path : str , enable_etdump : bool = False , debug_buffer_size : int = 0
4160) -> ExecuTorchModule :
4261 """Load an ExecuTorch Program from a file.
62+
63+ .. warning::
64+
65+ This API is experimental and subject to change without notice.
66+
4367 Args:
4468 path: File path to the ExecuTorch program as a string.
4569 enable_etdump: If true, enables an ETDump which can store profiling information.
@@ -53,23 +77,75 @@ def _load_for_executorch(
5377 """
5478 ...
5579
80+ @experimental ("This API is experimental and subject to change without notice." )
5681def _load_for_executorch_from_buffer (
5782 buffer : bytes , enable_etdump : bool = False , debug_buffer_size : int = 0
5883) -> ExecuTorchModule :
59- """Same as _load_for_executorch, but takes a byte buffer instead of a file path."""
84+ """Same as _load_for_executorch, but takes a byte buffer instead of a file path.
85+
86+ .. warning::
87+
88+ This API is experimental and subject to change without notice.
89+ """
6090 ...
6191
92+ @experimental ("This API is experimental and subject to change without notice." )
6293def _load_for_executorch_from_bundled_program (
6394 module : BundledModule , enable_etdump : bool = False , debug_buffer_size : int = 0
6495) -> ExecuTorchModule :
6596 """Same as _load_for_executorch, but takes a bundled program instead of a file path.
66- See https://pytorch.org/executorch/stable/sdk-bundled-io.html for documentation."""
97+
98+ See https://pytorch.org/executorch/stable/sdk-bundled-io.html for documentation.
99+
100+ .. warning::
101+
102+ This API is experimental and subject to change without notice.
103+ """
67104 ...
68105
106+ @experimental ("This API is experimental and subject to change without notice." )
69107def _load_bundled_program_from_buffer (
70108 buffer : bytes , non_const_pool_size : int = ...
71- ) -> BundledModule : ...
72- def _get_operator_names () -> List [str ]: ...
73- def _create_profile_block (name : str ) -> None : ...
74- def _dump_profile_results () -> bytes : ...
75- def _reset_profile_results () -> None : ...
109+ ) -> BundledModule :
110+ """
111+ .. warning::
112+
113+ This API is experimental and subject to change without notice.
114+ """
115+ ...
116+
117+ @experimental ("This API is experimental and subject to change without notice." )
118+ def _get_operator_names () -> List [str ]:
119+ """
120+ .. warning::
121+
122+ This API is experimental and subject to change without notice.
123+ """
124+ ...
125+
126+ @experimental ("This API is experimental and subject to change without notice." )
127+ def _create_profile_block (name : str ) -> None :
128+ """
129+ .. warning::
130+
131+ This API is experimental and subject to change without notice.
132+ """
133+ ...
134+
135+ @experimental ("This API is experimental and subject to change without notice." )
136+ def _dump_profile_results () -> bytes :
137+ """
138+ .. warning::
139+
140+ This API is experimental and subject to change without notice.
141+ """
142+ ...
143+
144+ @experimental ("This API is experimental and subject to change without notice." )
145+ def _reset_profile_results () -> None :
146+ """
147+ .. warning::
148+
149+ This API is experimental and subject to change without notice.
150+ """
151+ ...
0 commit comments