Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions examples/arm/aot_arm_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import copy
import logging
import os
import sys

from pathlib import Path
from typing import Any, Dict, List, Optional, Tuple
Expand Down Expand Up @@ -161,6 +162,7 @@ def _load_python_module_model(
raise RuntimeError(f"Unable to load model file {model_name}")
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
sys.modules["tmp_model"] = module
model = module.ModelUnderTest
inputs = example_inputs if example_inputs is not None else module.ModelInputs

Expand Down
4 changes: 3 additions & 1 deletion examples/arm/example_modules/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@

import torch

b = 2


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

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


ModelUnderTest = myModelAdd()
Expand Down
Loading