Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
7 changes: 7 additions & 0 deletions examples/arm/example_modules/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Example of an external model for the ARM AOT Compiler
Example of an external Python file to be used as a module by the `run.sh` (and the `aot_arm_compiler.py`) scripts in `examples/arm` directory.
Just pass the path of the `add.py` file as `--model_name`:

`ModelUnderTest` should be a `torch.nn.module` instance.

`ModelInputs` should be a tuple of inputs to the forward function.
11 changes: 11 additions & 0 deletions examples/arm/example_modules/add.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import torch

class myModelAdd(torch.nn.Module):
def __init__(self):
super().__init__()

def forward(self, x):
return x + x

ModelUnderTest=myModelAdd()
ModelInputs = (torch.ones(5),)
Loading