Skip to content

Clarify that the python example isn't exactly the same #1072

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions docs/source/getting-started-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,17 @@ To generate a sample program, complete the following steps:
```
:::

This command has created a `add.pte` file that contains your sample program.
This command has created a `add.pte` file that contains your sample program,
which adds its inputs multiple times.

Alternatively, you can use a Python Interpreter to perform the same action:
Alternatively, you can use a Python interpreter to perform similar steps, this
time creating a `mul.pte` program file that multiplies its inputs:

```python
>>> import executorch.exir as exir
>>> from executorch.exir.tests.models import Mul
>>> m = Mul()
>>> print(exir.capture(m, m.get_random_inputs()).to_edge())
>>> open("mul.pte", "wb").write(exir.capture(m, m.get_random_inputs()).to_edge().to_executorch().buffer)
import executorch.exir as exir
from executorch.exir.tests.models import Mul
m = Mul()
open("mul.pte", "wb").write(exir.capture(m, m.get_random_inputs()).to_edge().to_executorch().buffer)
```

In this step, you learned how you can export your PyTorch program to an ExecuTorch
Expand Down