You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/extension-module.md
+15-6Lines changed: 15 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,23 +6,23 @@ In the [Running an ExecuTorch Model in C++ Tutorial](running-a-model-cpp-tutoria
6
6
7
7
## Example
8
8
9
-
Let's see how we can run the `SimpleConv` model generated from the [Exporting to ExecuTorch tutorial](./tutorials/export-to-executorch-tutorial) using the `Module` APIs:
9
+
Let's see how we can run the `SimpleConv` model generated from the [Exporting to ExecuTorch tutorial](./tutorials/export-to-executorch-tutorial) using the `Module`and [`TensorPtr`](extension-tensor.md)APIs:
Note: the `Program` is loaded automatically before any `Method` is loaded. Subsequent attemps to load them have no effect if one of the previous attemps was successful.
64
64
65
+
You can also force-load the "forward" method with a convenience syntax:
66
+
67
+
```cpp
68
+
constauto error = module.load_forward();
69
+
70
+
assert(module.is_method_loaded("forward"));
71
+
```
72
+
65
73
### Querying for Metadata
66
74
67
75
Get a set of method names that a Module contains udsing the `method_names()` function:
@@ -131,10 +139,11 @@ Use [ExecuTorch Dump](sdk-etdump.md) to trace model execution. Create an instanc
0 commit comments